##// END OF EJS Templates
Merge pull request #7521 from amcdawes/i7322...
Min RK -
r20113:57a15248 merge
parent child Browse files
Show More
@@ -82,7 +82,7 b' define(['
82 'tab':'⇥',
82 'tab':'⇥',
83 'backtab':'⇤',
83 'backtab':'⇤',
84 'capslock':'⇪',
84 'capslock':'⇪',
85 'esc':'',
85 'esc':'esc',
86 'ctrl':'⌃',
86 'ctrl':'⌃',
87 'enter':'↩',
87 'enter':'↩',
88 'pageup':'⇞',
88 'pageup':'⇞',
@@ -178,6 +178,10 b' define(['
178 'border. <b>Command mode</b> binds the keyboard to notebook level actions '+
178 'border. <b>Command mode</b> binds the keyboard to notebook level actions '+
179 'and is indicated by a grey cell border.'
179 'and is indicated by a grey cell border.'
180 );
180 );
181 if (platform === 'MacOS') {
182 var key_div = this.build_key_names();
183 doc.append(key_div);
184 }
181 element.append(doc);
185 element.append(doc);
182
186
183 // Command mode
187 // Command mode
@@ -203,6 +207,33 b' define(['
203 this.events.on('rebuild.QuickHelp', function() { that.force_rebuild = true;});
207 this.events.on('rebuild.QuickHelp', function() { that.force_rebuild = true;});
204 };
208 };
205
209
210 QuickHelp.prototype.build_key_names = function () {
211 var key_names_mac = [{ shortcut:"⌘", help:"Command" },
212 { shortcut:"⌃", help:"Control" },
213 { shortcut:"⌥", help:"Option" },
214 { shortcut:"⇧", help:"Shift" },
215 { shortcut:"↩", help:"Return" },
216 { shortcut:"␣", help:"Space" },
217 { shortcut:"⇥", help:"Tab" }];
218 var i, half, n;
219 var div = $('<div/>').append('MacOS modifier keys:');
220 var sub_div = $('<div/>').addClass('container-fluid');
221 var col1 = $('<div/>').addClass('col-md-6');
222 var col2 = $('<div/>').addClass('col-md-6');
223 n = key_names_mac.length;
224 half = ~~(n/2);
225 for (i=0; i<half; i++) { col1.append(
226 build_one(key_names_mac[i])
227 ); }
228 for (i=half; i<n; i++) { col2.append(
229 build_one(key_names_mac[i])
230 ); }
231 sub_div.append(col1).append(col2);
232 div.append(sub_div);
233 return div;
234 };
235
236
206 QuickHelp.prototype.build_command_help = function () {
237 QuickHelp.prototype.build_command_help = function () {
207 var command_shortcuts = this.keyboard_manager.command_shortcuts.help();
238 var command_shortcuts = this.keyboard_manager.command_shortcuts.help();
208 return build_div('<h4>Command Mode (press <code>Esc</code> to enable)</h4>', command_shortcuts);
239 return build_div('<h4>Command Mode (press <code>Esc</code> to enable)</h4>', command_shortcuts);
General Comments 0
You need to be logged in to leave comments. Login now