From fe2ea22983e29b1e99dabe883e773c4949d3d6e2 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 13 Apr 2012 12:23:00 -0700 Subject: IKNinja-1022 - PaintBucket tooltip is incorrect. Also added kb shortcuts for PaintBucket, InkBottle and Eyedropper tools. Signed-off-by: Nivesh Rajbhandari --- js/mediators/keyboard-mediator.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'js/mediators/keyboard-mediator.js') diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 82596693..79967799 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js @@ -168,6 +168,24 @@ exports.KeyboardMediator = Montage.create(Component, { return; } + // Paint Bucket Tool and Ink Bottle tools share keyboard shortcut K + if(evt.keyCode === Keyboard.K ) { + evt.preventDefault(); + if(this.application.ninja.toolsData.selectedTool.id === "FillTool") { + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[11]}); + } else { + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[10]}); + } + return; + } + + // Shortcut for Eyedropper Tool is I + if(evt.keyCode === Keyboard.I ) { + evt.preventDefault(); + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[12]}); + return; + } + // Rotate Stage Tool is M if(evt.keyCode === Keyboard.M ) { evt.preventDefault(); -- cgit v1.2.3