diff options
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/keyboard-mediator.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index a1fdead3..e348a09b 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js | |||
@@ -85,7 +85,7 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
85 | 85 | ||
86 | handleKeydown: { | 86 | handleKeydown: { |
87 | value: function(evt) { | 87 | value: function(evt) { |
88 | if(document.activeElement.nodeName !== "BODY") { | 88 | if((document.activeElement.nodeName !== "BODY") && (this.application.ninja.documentController.activeDocument.currentView === "design")) { |
89 | // Don't do anything if an input or other control is focused | 89 | // Don't do anything if an input or other control is focused |
90 | return; | 90 | return; |
91 | } | 91 | } |
@@ -110,6 +110,13 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
110 | return; | 110 | return; |
111 | } | 111 | } |
112 | 112 | ||
113 | // Check if cmd+s/ctrl+s for Save (Windows/Mac) | ||
114 | if ((evt.keyCode == Keyboard.S) && (evt.ctrlKey || evt.metaKey) && !evt.shiftKey) { | ||
115 | NJevent("executeSave"); | ||
116 | evt.preventDefault(); | ||
117 | return; | ||
118 | } | ||
119 | |||
113 | // Check if cmd+shift+z for Redo (Mac) | 120 | // Check if cmd+shift+z for Redo (Mac) |
114 | if ((evt.keyCode == Keyboard.Z) && evt.metaKey && evt.shiftKey) { | 121 | if ((evt.keyCode == Keyboard.Z) && evt.metaKey && evt.shiftKey) { |
115 | NJevent("executeRedo"); | 122 | NJevent("executeRedo"); |