aboutsummaryrefslogtreecommitdiff
path: root/js/mediators/keyboard-mediator.js
diff options
context:
space:
mode:
authorJon Reid2012-03-01 09:23:46 -0800
committerJon Reid2012-03-01 09:23:46 -0800
commite67000c704e284f4ab9b50c845853988272ce800 (patch)
treefad04a6a5ef5bfc8fa4efe88dac3eb7329bc3596 /js/mediators/keyboard-mediator.js
parent939cb7eccb8a5ec655fbde8b470894d293832307 (diff)
parent82ed48cc48ae1f8163021a0998e00d87da396d65 (diff)
downloadninja-e67000c704e284f4ab9b50c845853988272ce800.tar.gz
Merge branch 'Timeline-main' into Timeline-newdoc
Diffstat (limited to 'js/mediators/keyboard-mediator.js')
-rwxr-xr-xjs/mediators/keyboard-mediator.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js
index 443a18ac..65dd34cd 100755
--- a/js/mediators/keyboard-mediator.js
+++ b/js/mediators/keyboard-mediator.js
@@ -136,6 +136,13 @@ exports.KeyboardMediator = Montage.create(Component, {
136 return; 136 return;
137 } 137 }
138 138
139 // shortcut for Pen tool is P
140 if (evt.keyCode === Keyboard.P){
141 evt.preventDefault();
142 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[5]});
143 return;
144 }
145
139 // Shortcut for Rectangle Tool is R 146 // Shortcut for Rectangle Tool is R
140 // unless the user is pressing the command key. 147 // unless the user is pressing the command key.
141 // If the user is pressing the command key, they want to refresh the browser. 148 // If the user is pressing the command key, they want to refresh the browser.
@@ -162,6 +169,13 @@ exports.KeyboardMediator = Montage.create(Component, {
162 return; 169 return;
163 } 170 }
164 171
172 // Rotate Stage Tool is M
173 if(evt.keyCode === Keyboard.M ) {
174 evt.preventDefault();
175 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]});
176 return;
177 }
178
165 // Hand tool 179 // Hand tool
166 if(evt.keyCode === Keyboard.H ) { 180 if(evt.keyCode === Keyboard.H ) {
167 evt.preventDefault(); 181 evt.preventDefault();
@@ -170,7 +184,7 @@ exports.KeyboardMediator = Montage.create(Component, {
170 } 184 }
171 185
172 // Zoom tool 186 // Zoom tool
173 if(evt.keyCode === Keyboard.Z ) { 187 if((evt.keyCode === Keyboard.Z) && !(evt.ctrlKey || evt.metaKey) && !evt.shiftKey) {//ctrl or shift key not press with Z
174 evt.preventDefault(); 188 evt.preventDefault();
175 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]}); 189 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]});
176 return; 190 return;