Enhancement : Adding CTRL+SHIFT+Z as REDO shortcut

This commit is contained in:
jdescottes 2015-09-20 12:25:54 +02:00
parent d576c56068
commit 055bcdb001
2 changed files with 6 additions and 3 deletions

View File

@ -28,6 +28,7 @@
this.shortcutService.addShortcut('ctrl+Z', this.undo.bind(this)); this.shortcutService.addShortcut('ctrl+Z', this.undo.bind(this));
this.shortcutService.addShortcut('ctrl+Y', this.redo.bind(this)); this.shortcutService.addShortcut('ctrl+Y', this.redo.bind(this));
this.shortcutService.addShortcut('ctrl+shift+Z', this.redo.bind(this));
this.saveState({ this.saveState({
type : ns.HistoryService.SNAPSHOT type : ns.HistoryService.SNAPSHOT

View File

@ -14,9 +14,11 @@
/** /**
* Add a keyboard shortcut * Add a keyboard shortcut
* @param {String} rawKey (case insensitive) key can be a meta (optional) + [a-z0-9] or * @param {String} rawKey (case insensitive) a key is a combination of modifiers + ([a-z0-9] or
* a special key (check list of supported keys in KeycodeTranslator) * a special key) (check list of supported special keys in KeycodeTranslator)
* eg. 'ctrl+A', 'del' * eg. 'ctrl+A',
* 'del'
* 'ctrl+shift+S'
* @param {Function} callback should return true to let the original event perform its default action * @param {Function} callback should return true to let the original event perform its default action
*/ */
ns.ShortcutService.prototype.addShortcut = function (rawKey, callback) { ns.ShortcutService.prototype.addShortcut = function (rawKey, callback) {