Show More
@@ -455,18 +455,18 var IPython = (function (IPython) { | |||
|
455 | 455 | return help; |
|
456 | 456 | } |
|
457 | 457 | |
|
458 |
ShortcutManager.prototype. |
|
|
458 | ShortcutManager.prototype.normalize_key = function (key) { | |
|
459 | 459 | return inv_keycodes[keycodes[key]]; |
|
460 | 460 | } |
|
461 | 461 | |
|
462 |
ShortcutManager.prototype. |
|
|
462 | ShortcutManager.prototype.normalize_shortcut = function (shortcut) { | |
|
463 | 463 | // Sort a sequence of + separated modifiers into the order alt+ctrl+meta+shift |
|
464 | 464 | var values = shortcut.split("+"); |
|
465 | 465 | if (values.length === 1) { |
|
466 |
return this. |
|
|
466 | return this.normalize_key(values[0]) | |
|
467 | 467 | } else { |
|
468 | 468 | var modifiers = values.slice(0,-1); |
|
469 |
var key = this. |
|
|
469 | var key = this.normalize_key(values[values.length-1]); | |
|
470 | 470 | modifiers.sort(); |
|
471 | 471 | return modifiers.join('+') + '+' + key; |
|
472 | 472 | } |
@@ -489,7 +489,7 var IPython = (function (IPython) { | |||
|
489 | 489 | } |
|
490 | 490 | |
|
491 | 491 | ShortcutManager.prototype.add_shortcut = function (shortcut, data) { |
|
492 |
shortcut = this. |
|
|
492 | shortcut = this.normalize_shortcut(shortcut); | |
|
493 | 493 | this._shortcuts[shortcut] = data; |
|
494 | 494 | } |
|
495 | 495 | |
@@ -500,7 +500,7 var IPython = (function (IPython) { | |||
|
500 | 500 | } |
|
501 | 501 | |
|
502 | 502 | ShortcutManager.prototype.remove_shortcut = function (shortcut) { |
|
503 |
shortcut = this. |
|
|
503 | shortcut = this.normalize_shortcut(shortcut); | |
|
504 | 504 | delete this._shortcuts[shortcut]; |
|
505 | 505 | } |
|
506 | 506 |
General Comments 0
You need to be logged in to leave comments.
Login now