##// END OF EJS Templates
Keep kernel-related bindings together in code.
Fernando Perez -
Show More
@@ -130,9 +130,9 b' var IPython = (function (IPython) {'
130 that.select_next();
130 that.select_next();
131 that.control_key_active = false;
131 that.control_key_active = false;
132 return false;
132 return false;
133 } else if (event.which === 72 && that.control_key_active) {
133 } else if (event.which === 76 && that.control_key_active) {
134 // Show keyboard shortcuts = h
134 // Toggle line numbers = l
135 that.show_keyboard_shortcuts();
135 that.cell_toggle_line_numbers();
136 that.control_key_active = false;
136 that.control_key_active = false;
137 return false;
137 return false;
138 } else if (event.which === 73 && that.control_key_active) {
138 } else if (event.which === 73 && that.control_key_active) {
@@ -140,16 +140,16 b' var IPython = (function (IPython) {'
140 IPython.notebook.kernel.interrupt();
140 IPython.notebook.kernel.interrupt();
141 that.control_key_active = false;
141 that.control_key_active = false;
142 return false;
142 return false;
143 } else if (event.which === 76 && that.control_key_active) {
144 // Toggle line numbers = l
145 that.cell_toggle_line_numbers();
146 that.control_key_active = false;
147 return false;
148 } else if (event.which === 190 && that.control_key_active) {
143 } else if (event.which === 190 && that.control_key_active) {
149 // Restart kernel = . # matches qt console
144 // Restart kernel = . # matches qt console
150 IPython.notebook.restart_kernel();
145 IPython.notebook.restart_kernel();
151 that.control_key_active = false;
146 that.control_key_active = false;
152 return false;
147 return false;
148 } else if (event.which === 72 && that.control_key_active) {
149 // Show keyboard shortcuts = h
150 that.show_keyboard_shortcuts();
151 that.control_key_active = false;
152 return false;
153 } else if (that.control_key_active) {
153 } else if (that.control_key_active) {
154 that.control_key_active = false;
154 that.control_key_active = false;
155 return true;
155 return true;
General Comments 0
You need to be logged in to leave comments. Login now