Show More
@@ -70,7 +70,7 b' var IPython = (function (IPython) {' | |||
|
70 | 70 | if (this.read_only){ |
|
71 | 71 | return false; |
|
72 | 72 | } |
|
73 | ||
|
73 | ||
|
74 | 74 | // note that we are comparing and setting the time to wait at each key press. |
|
75 | 75 | // a better wqy might be to generate a new function on each time change and |
|
76 | 76 | // assign it to CodeCell.prototype.request_tooltip_after_time |
@@ -82,7 +82,8 b' var IPython = (function (IPython) {' | |||
|
82 | 82 | if(event.type === 'keydown' ){ |
|
83 | 83 | that.remove_and_cancel_tooltip(); |
|
84 | 84 | } |
|
85 | ||
|
85 | ||
|
86 | ||
|
86 | 87 | if (event.keyCode === 13 && (event.shiftKey || event.ctrlKey)) { |
|
87 | 88 | // Always ignore shift-enter in CodeMirror as we handle it. |
|
88 | 89 | return true; |
@@ -62,7 +62,14 b' var IPython = (function (IPython) {' | |||
|
62 | 62 | $(document).keydown(function (event) { |
|
63 | 63 | // console.log(event); |
|
64 | 64 | if (that.read_only) return true; |
|
65 | if (event.which === 27) { | |
|
65 | ||
|
66 | // Save (CTRL+S) or (AppleKey+S) | |
|
67 | //metaKey = applekey on mac | |
|
68 | if ((event.ctrlKey || event.metaKey) && event.keyCode==83) { | |
|
69 | IPython.save_widget.save_notebook(); | |
|
70 | event.preventDefault(); | |
|
71 | return false; | |
|
72 | } else if (event.which === 27) { | |
|
66 | 73 | // Intercept escape at highest level to avoid closing |
|
67 | 74 | // websocket connection with firefox |
|
68 | 75 | event.preventDefault(); |
@@ -67,7 +67,7 b' var IPython = (function (IPython) {' | |||
|
67 | 67 | // handlers and is used to provide custom key handling. Its return |
|
68 | 68 | // value is used to determine if CodeMirror should ignore the event: |
|
69 | 69 | // true = ignore, false = don't ignore. |
|
70 | ||
|
70 | ||
|
71 | 71 | if (event.keyCode === 13 && (event.shiftKey || event.ctrlKey)) { |
|
72 | 72 | // Always ignore shift-enter in CodeMirror as we handle it. |
|
73 | 73 | return true; |
General Comments 0
You need to be logged in to leave comments.
Login now