|
|
|
|
@ -62,68 +62,68 @@ define([
|
|
|
|
|
*/
|
|
|
|
|
KeyboardManager.prototype.get_default_common_shortcuts = function() {
|
|
|
|
|
return {
|
|
|
|
|
'shift' : 'jupyter-notebook:ignore',
|
|
|
|
|
'shift-enter' : 'jupyter-notebook:run-cell-and-select-next',
|
|
|
|
|
'ctrl-enter' : 'jupyter-notebook:run-cell',
|
|
|
|
|
'alt-enter' : 'jupyter-notebook:run-cell-and-insert-below',
|
|
|
|
|
'shift' : 'jp-notebook:ignore',
|
|
|
|
|
'shift-enter' : 'jp-notebook:run-cell-and-select-next',
|
|
|
|
|
'ctrl-enter' : 'jp-notebook:run-cell',
|
|
|
|
|
'alt-enter' : 'jp-notebook:run-cell-and-insert-below',
|
|
|
|
|
// cmd on mac, ctrl otherwise
|
|
|
|
|
'cmdtrl-s' : 'jupyter-notebook:save-notebook',
|
|
|
|
|
'cmdtrl-s' : 'jp-notebook:save-notebook',
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
KeyboardManager.prototype.get_default_edit_shortcuts = function() {
|
|
|
|
|
return {
|
|
|
|
|
'cmdtrl-shift-p' : 'jupyter-notebook:show-command-palette',
|
|
|
|
|
'esc' : 'jupyter-notebook:enter-command-mode',
|
|
|
|
|
'ctrl-m' : 'jupyter-notebook:enter-command-mode',
|
|
|
|
|
'up' : 'jupyter-notebook:move-cursor-up',
|
|
|
|
|
'down' : 'jupyter-notebook:move-cursor-down',
|
|
|
|
|
'ctrl-shift--' : 'jupyter-notebook:split-cell-at-cursor',
|
|
|
|
|
'ctrl-shift-subtract' : 'jupyter-notebook:split-cell-at-cursor',
|
|
|
|
|
'cmdtrl-shift-p' : 'jp-notebook:show-command-palette',
|
|
|
|
|
'esc' : 'jp-notebook:enter-command-mode',
|
|
|
|
|
'ctrl-m' : 'jp-notebook:enter-command-mode',
|
|
|
|
|
'up' : 'jp-notebook:move-cursor-up',
|
|
|
|
|
'down' : 'jp-notebook:move-cursor-down',
|
|
|
|
|
'ctrl-shift--' : 'jp-notebook:split-cell-at-cursor',
|
|
|
|
|
'ctrl-shift-subtract' : 'jp-notebook:split-cell-at-cursor',
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
KeyboardManager.prototype.get_default_command_shortcuts = function() {
|
|
|
|
|
return {
|
|
|
|
|
'cmdtrl-shift-p': 'jupyter-notebook:show-command-palette',
|
|
|
|
|
'shift-space': 'jupyter-notebook:scroll-notebook-up',
|
|
|
|
|
'shift-v' : 'jupyter-notebook:paste-cell-above',
|
|
|
|
|
'shift-m' : 'jupyter-notebook:merge-cells',
|
|
|
|
|
'shift-o' : 'jupyter-notebook:toggle-cell-output-scrolling',
|
|
|
|
|
'enter' : 'jupyter-notebook:enter-edit-mode',
|
|
|
|
|
'space' : 'jupyter-notebook:scroll-notebook-down',
|
|
|
|
|
'down' : 'jupyter-notebook:select-next-cell',
|
|
|
|
|
'i,i' : 'jupyter-notebook:interrupt-kernel',
|
|
|
|
|
'0,0' : 'jupyter-notebook:confirm-restart-kernel',
|
|
|
|
|
'd,d' : 'jupyter-notebook:delete-cell',
|
|
|
|
|
'esc': 'jupyter-notebook:close-pager',
|
|
|
|
|
'up' : 'jupyter-notebook:select-previous-cell',
|
|
|
|
|
'k' : 'jupyter-notebook:select-previous-cell',
|
|
|
|
|
'j' : 'jupyter-notebook:select-next-cell',
|
|
|
|
|
'shift-k': 'jupyter-notebook:extend-cell-selection-above',
|
|
|
|
|
'shift-j': 'jupyter-notebook:extend-cell-selection-below',
|
|
|
|
|
'shift-up': 'jupyter-notebook:extend-cell-selection-above',
|
|
|
|
|
'shift-down': 'jupyter-notebook:extend-cell-selection-below',
|
|
|
|
|
'x' : 'jupyter-notebook:cut-cell',
|
|
|
|
|
'c' : 'jupyter-notebook:copy-cell',
|
|
|
|
|
'v' : 'jupyter-notebook:paste-cell-below',
|
|
|
|
|
'a' : 'jupyter-notebook:insert-cell-above',
|
|
|
|
|
'b' : 'jupyter-notebook:insert-cell-below',
|
|
|
|
|
'y' : 'jupyter-notebook:change-cell-to-code',
|
|
|
|
|
'm' : 'jupyter-notebook:change-cell-to-markdown',
|
|
|
|
|
'r' : 'jupyter-notebook:change-cell-to-raw',
|
|
|
|
|
'1' : 'jupyter-notebook:change-cell-to-heading-1',
|
|
|
|
|
'2' : 'jupyter-notebook:change-cell-to-heading-2',
|
|
|
|
|
'3' : 'jupyter-notebook:change-cell-to-heading-3',
|
|
|
|
|
'4' : 'jupyter-notebook:change-cell-to-heading-4',
|
|
|
|
|
'5' : 'jupyter-notebook:change-cell-to-heading-5',
|
|
|
|
|
'6' : 'jupyter-notebook:change-cell-to-heading-6',
|
|
|
|
|
'o' : 'jupyter-notebook:toggle-cell-output-visibility',
|
|
|
|
|
's' : 'jupyter-notebook:save-notebook',
|
|
|
|
|
'l' : 'jupyter-notebook:toggle-cell-line-numbers',
|
|
|
|
|
'h' : 'jupyter-notebook:show-keyboard-shortcuts',
|
|
|
|
|
'z' : 'jupyter-notebook:undo-cell-deletion',
|
|
|
|
|
'q' : 'jupyter-notebook:close-pager',
|
|
|
|
|
'cmdtrl-shift-p': 'jp-notebook:show-command-palette',
|
|
|
|
|
'shift-space': 'jp-notebook:scroll-notebook-up',
|
|
|
|
|
'shift-v' : 'jp-notebook:paste-cell-above',
|
|
|
|
|
'shift-m' : 'jp-notebook:merge-cells',
|
|
|
|
|
'shift-o' : 'jp-notebook:toggle-cell-output-scrolling',
|
|
|
|
|
'enter' : 'jp-notebook:enter-edit-mode',
|
|
|
|
|
'space' : 'jp-notebook:scroll-notebook-down',
|
|
|
|
|
'down' : 'jp-notebook:select-next-cell',
|
|
|
|
|
'i,i' : 'jp-notebook:interrupt-kernel',
|
|
|
|
|
'0,0' : 'jp-notebook:confirm-restart-kernel',
|
|
|
|
|
'd,d' : 'jp-notebook:delete-cell',
|
|
|
|
|
'esc': 'jp-notebook:close-pager',
|
|
|
|
|
'up' : 'jp-notebook:select-previous-cell',
|
|
|
|
|
'k' : 'jp-notebook:select-previous-cell',
|
|
|
|
|
'j' : 'jp-notebook:select-next-cell',
|
|
|
|
|
'shift-k': 'jp-notebook:extend-cell-selection-above',
|
|
|
|
|
'shift-j': 'jp-notebook:extend-cell-selection-below',
|
|
|
|
|
'shift-up': 'jp-notebook:extend-cell-selection-above',
|
|
|
|
|
'shift-down': 'jp-notebook:extend-cell-selection-below',
|
|
|
|
|
'x' : 'jp-notebook:cut-cell',
|
|
|
|
|
'c' : 'jp-notebook:copy-cell',
|
|
|
|
|
'v' : 'jp-notebook:paste-cell-below',
|
|
|
|
|
'a' : 'jp-notebook:insert-cell-above',
|
|
|
|
|
'b' : 'jp-notebook:insert-cell-below',
|
|
|
|
|
'y' : 'jp-notebook:change-cell-to-code',
|
|
|
|
|
'm' : 'jp-notebook:change-cell-to-markdown',
|
|
|
|
|
'r' : 'jp-notebook:change-cell-to-raw',
|
|
|
|
|
'1' : 'jp-notebook:change-cell-to-heading-1',
|
|
|
|
|
'2' : 'jp-notebook:change-cell-to-heading-2',
|
|
|
|
|
'3' : 'jp-notebook:change-cell-to-heading-3',
|
|
|
|
|
'4' : 'jp-notebook:change-cell-to-heading-4',
|
|
|
|
|
'5' : 'jp-notebook:change-cell-to-heading-5',
|
|
|
|
|
'6' : 'jp-notebook:change-cell-to-heading-6',
|
|
|
|
|
'o' : 'jp-notebook:toggle-cell-output-visibility',
|
|
|
|
|
's' : 'jp-notebook:save-notebook',
|
|
|
|
|
'l' : 'jp-notebook:toggle-cell-line-numbers',
|
|
|
|
|
'h' : 'jp-notebook:show-keyboard-shortcuts',
|
|
|
|
|
'z' : 'jp-notebook:undo-cell-deletion',
|
|
|
|
|
'q' : 'jp-notebook:close-pager',
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|