mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Add initial collaboration keymap
This commit is contained in:
committed by
Nathan Sobo
parent
6d49e0fd57
commit
554af1becb
4
src/packages/collaboration/keymaps/collaboration.cson
Normal file
4
src/packages/collaboration/keymaps/collaboration.cson
Normal file
@@ -0,0 +1,4 @@
|
||||
'body':
|
||||
'meta-C': 'collaboration:copy-session-id'
|
||||
'meta-H': 'collaboration:start-session'
|
||||
'meta-K': 'collaboration:join-session'
|
||||
@@ -44,8 +44,14 @@ joinSession = (id) ->
|
||||
|
||||
module.exports =
|
||||
activate: ->
|
||||
sessionId = null
|
||||
|
||||
rootView.command 'collaboration:copy-session-id', ->
|
||||
pasteboart.write(sessionId) if sessionId
|
||||
|
||||
rootView.command 'collaboration:start-session', ->
|
||||
pasteboard.write(startSession())
|
||||
if sessionId = startSession()
|
||||
pasteboard.write(sessionId)
|
||||
|
||||
rootView.command 'collaboration:join-session', ->
|
||||
new Prompt 'Enter a session id to join', (id) ->
|
||||
|
||||
Reference in New Issue
Block a user