mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
new function build_key_names to automate
This commit is contained in:
parent
471c1c9bba
commit
1a10511143
@ -206,7 +206,7 @@ define([
|
||||
//'⌫ Delete back'+
|
||||
//'⌦ Delete forward'+
|
||||
//'<div class="col-md-4">col3</div>'
|
||||
);
|
||||
);
|
||||
}
|
||||
element.append(doc);
|
||||
|
||||
@ -233,6 +233,21 @@ define([
|
||||
this.events.on('rebuild.QuickHelp', function() { that.force_rebuild = true;});
|
||||
};
|
||||
|
||||
QuickHelp.prototype.build_key_names = function () {
|
||||
var key_names_mac = [{ key:"⌘", name:"Command" },
|
||||
{ key:"⌃", name:"Control" },
|
||||
{ key:"⌥", name:"Option" },
|
||||
{ key:"⇧", name:"Shift" },
|
||||
{ key:"↩", name:"Return" },
|
||||
{ key:"␣", name:"Space" },
|
||||
{ key:"⇥", name:"Tab forward" },
|
||||
{ key:"⇤", name:"Tab back" }];
|
||||
return $('<div>').addClass('quickhelp').
|
||||
append($('<span/>').addClass('shortcut_key').append($(key))).
|
||||
append($('<span/>').addClass('shortcut_descr').text(' = ' + name));
|
||||
};
|
||||
|
||||
|
||||
QuickHelp.prototype.build_command_help = function () {
|
||||
var command_shortcuts = this.keyboard_manager.command_shortcuts.help();
|
||||
return build_div('<h4>Command Mode (press <code>Esc</code> to enable)</h4>', command_shortcuts);
|
||||
|
Loading…
Reference in New Issue
Block a user