Added keymap to rebind the 'break' command - Issue #2432 (#2531)

* fixed documentation of roleCommands

* Added keymap for break/interrupt command

* added break keymap for linux and darwin

* fixed lint errors
This commit is contained in:
Renato Campos 2017-12-18 16:17:20 +00:00 committed by Albin Ekblom
parent 7be41e1e28
commit cb8b72a319
6 changed files with 11 additions and 1 deletions

View file

@ -93,6 +93,9 @@ const commands = {
},
'editor:deleteEndLine': focusedWindow => {
focusedWindow && focusedWindow.rpc.emit('session del line end req');
},
'editor:break': focusedWindow => {
focusedWindow && focusedWindow.rpc.emit('session break req');
}
};

View file

@ -46,5 +46,6 @@
"editor:deleteEndLine": "command+delete",
"editor:clearBuffer": "command+k",
"editor:emojis": "command+ctrl+space",
"editor:break": "ctrl+c",
"plugins:update": "command+shift+u"
}

View file

@ -45,5 +45,6 @@
"editor:deleteBeginningLine": "ctrl+home",
"editor:deleteEndLine": "ctrl+end",
"editor:clearBuffer": "ctrl+shift+k",
"editor:break": "ctrl+c",
"plugins:update": "ctrl+shift+u"
}

View file

@ -48,5 +48,6 @@
"editor:deleteBeginningLine": "ctrl+home",
"editor:deleteEndLine": "ctrl+end",
"editor:clearBuffer": "ctrl+shift+k",
"editor:break": "ctrl+c",
"plugins:update": "ctrl+shift+u"
}

View file

@ -28,7 +28,7 @@ export const getCommandHandler = command => {
return commands[command];
};
// Some commands are firectly excuted by Electron menuItem role.
// Some commands are directly excuted by Electron menuItem role.
// They should not be prevented to reach Electron.
const roleCommands = [
'window:close',

View file

@ -99,6 +99,10 @@ rpc.on('session del line end req', () => {
store_.dispatch(sessionActions.sendSessionData(null, '\x10B'));
});
rpc.on('session break req', () => {
store_.dispatch(sessionActions.sendSessionData(null, '\x03'));
});
rpc.on('termgroup add req', () => {
store_.dispatch(termGroupActions.requestTermGroup());
});