Show More
@@ -237,6 +237,12 b' IPython.keyboard = (function (IPython) {' | |||
|
237 | 237 | return true; |
|
238 | 238 | } |
|
239 | 239 | |
|
240 | ShortcutManager.prototype.use_shortcut = function (event) { | |
|
241 | var shortcut = event_to_shortcut(event); | |
|
242 | var data = this._shortcuts[shortcut]; | |
|
243 | return !( data === undefined ) | |
|
244 | } | |
|
245 | ||
|
240 | 246 | return { |
|
241 | 247 | keycodes : keycodes, |
|
242 | 248 | inv_keycodes : inv_keycodes, |
@@ -169,6 +169,10 b' var IPython = (function (IPython) {' | |||
|
169 | 169 | */ |
|
170 | 170 | Cell.prototype.handle_codemirror_keyevent = function (editor, event) { |
|
171 | 171 | var that = this; |
|
172 | var shortcuts = IPython.keyboard_manager.edit_shortcuts; | |
|
173 | ||
|
174 | // if this is an edit_shortcuts shortcut, we've already handled it. | |
|
175 | if (shortcuts.use_shortcut(event)) { return true; } | |
|
172 | 176 | |
|
173 | 177 | if (event.keyCode === keycodes.enter && (event.shiftKey || event.ctrlKey || event.altKey)) { |
|
174 | 178 | // Always ignore shift-enter in CodeMirror as we handle it. |
General Comments 0
You need to be logged in to leave comments.
Login now