Show More
@@ -79,7 +79,7 b' var IPython = (function (IPython) {' | |||||
79 | half = ~~(n/2); // Truncate :) |
|
79 | half = ~~(n/2); // Truncate :) | |
80 | for (i=0; i<half; i++) { |
|
80 | for (i=0; i<half; i++) { | |
81 | help = command_shortcuts[i]['help']; |
|
81 | help = command_shortcuts[i]['help']; | |
82 | shortcut = command_shortcuts[i]['shortcut']; |
|
82 | shortcut = shortcut_name(command_shortcuts[i]['shortcut']); | |
83 | cmd_col1.append($('<div>').addClass('quickhelp'). |
|
83 | cmd_col1.append($('<div>').addClass('quickhelp'). | |
84 | append($('<span/>').addClass('shortcut_key').text(shortcut)). |
|
84 | append($('<span/>').addClass('shortcut_key').text(shortcut)). | |
85 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) |
|
85 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) | |
@@ -87,7 +87,7 b' var IPython = (function (IPython) {' | |||||
87 | }; |
|
87 | }; | |
88 | for (i=half; i<n; i++) { |
|
88 | for (i=half; i<n; i++) { | |
89 | help = command_shortcuts[i]['help']; |
|
89 | help = command_shortcuts[i]['help']; | |
90 | shortcut = command_shortcuts[i]['shortcut']; |
|
90 | shortcut = shortcut_name(command_shortcuts[i]['shortcut']); | |
91 | cmd_col2.append($('<div>').addClass('quickhelp'). |
|
91 | cmd_col2.append($('<div>').addClass('quickhelp'). | |
92 | append($('<span/>').addClass('shortcut_key').text(shortcut)). |
|
92 | append($('<span/>').addClass('shortcut_key').text(shortcut)). | |
93 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) |
|
93 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) | |
@@ -98,6 +98,13 b' var IPython = (function (IPython) {' | |||||
98 | return cmd_div; |
|
98 | return cmd_div; | |
99 | } |
|
99 | } | |
100 |
|
100 | |||
|
101 | var special_case = { pageup: "PageUp", pagedown: "Page Down" }; | |||
|
102 | var shortcut_name = function (s) { | |||
|
103 | return ( special_case[s] ? special_case[s] : s.charAt(0).toUpperCase() + s.slice(1) ); | |||
|
104 | ||||
|
105 | ||||
|
106 | }; | |||
|
107 | ||||
101 | QuickHelp.prototype.build_edit_help = function () { |
|
108 | QuickHelp.prototype.build_edit_help = function () { | |
102 | var edit_shortcuts = IPython.keyboard_manager.edit_shortcuts.help(); |
|
109 | var edit_shortcuts = IPython.keyboard_manager.edit_shortcuts.help(); | |
103 | var help, shortcut; |
|
110 | var help, shortcut; | |
@@ -112,7 +119,7 b' var IPython = (function (IPython) {' | |||||
112 | half = ~~(n/2); // Truncate :) |
|
119 | half = ~~(n/2); // Truncate :) | |
113 | for (i=0; i<half; i++) { |
|
120 | for (i=0; i<half; i++) { | |
114 | help = edit_shortcuts[i]['help']; |
|
121 | help = edit_shortcuts[i]['help']; | |
115 | shortcut = edit_shortcuts[i]['shortcut']; |
|
122 | shortcut = shortcut_name(edit_shortcuts[i]['shortcut']); | |
116 | edit_col1.append($('<div>').addClass('quickhelp'). |
|
123 | edit_col1.append($('<div>').addClass('quickhelp'). | |
117 | append($('<span/>').addClass('shortcut_key').text(shortcut)). |
|
124 | append($('<span/>').addClass('shortcut_key').text(shortcut)). | |
118 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) |
|
125 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) | |
@@ -120,7 +127,7 b' var IPython = (function (IPython) {' | |||||
120 | }; |
|
127 | }; | |
121 | for (i=half; i<n; i++) { |
|
128 | for (i=half; i<n; i++) { | |
122 | help = edit_shortcuts[i]['help']; |
|
129 | help = edit_shortcuts[i]['help']; | |
123 | shortcut = edit_shortcuts[i]['shortcut']; |
|
130 | shortcut = shortcut_name(edit_shortcuts[i]['shortcut']); | |
124 | edit_col2.append($('<div>').addClass('quickhelp'). |
|
131 | edit_col2.append($('<div>').addClass('quickhelp'). | |
125 | append($('<span/>').addClass('shortcut_key').text(shortcut)). |
|
132 | append($('<span/>').addClass('shortcut_key').text(shortcut)). | |
126 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) |
|
133 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) |
General Comments 0
You need to be logged in to leave comments.
Login now