From d934ac114cd5802ea257eb784f239ddcec0926ca Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Mon, 12 Oct 2015 13:18:40 -0700 Subject: [PATCH] Change hotkeys --- notebook/static/notebook/js/cell.js | 7 ++++--- notebook/static/notebook/js/keyboardmanager.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/notebook/static/notebook/js/cell.js b/notebook/static/notebook/js/cell.js index 74861fa39..7dc52332f 100644 --- a/notebook/static/notebook/js/cell.js +++ b/notebook/static/notebook/js/cell.js @@ -169,9 +169,10 @@ define([ if (!that.selected) { that.events.trigger('select.Cell', {'cell':that}); } - - // Ctrl-click should mark the c ell. - if (event.ctrlKey) { + + // Cmdtrl-click should mark the cell. + var isMac = navigator.platform.slice(0, 3).toLowerCase() === 'mac'; + if ((!isMac && event.ctrlKey) || (isMac && event.metaKey)) { that.marked = !that.marked; } }); diff --git a/notebook/static/notebook/js/keyboardmanager.js b/notebook/static/notebook/js/keyboardmanager.js index 1fa1cf2bd..519939cb6 100644 --- a/notebook/static/notebook/js/keyboardmanager.js +++ b/notebook/static/notebook/js/keyboardmanager.js @@ -93,7 +93,7 @@ define([ 'enter' : 'ipython.enter-edit-mode', 'space' : 'ipython.scroll-down', 'down' : 'ipython.select-next-cell', - 'cmdtrl-space' : 'ipython.toggle-marks', + 'ctrl-space' : 'ipython.toggle-marks', 'i,i' : 'ipython.interrupt-kernel', '0,0' : 'ipython.restart-kernel', 'd,d' : 'ipython.delete-cell',