From 4edbc29e72aafc31cda58b57fbaae34c75b15173 Mon Sep 17 00:00:00 2001 From: jdescottes Date: Fri, 8 May 2015 22:32:18 +0200 Subject: [PATCH] Fix #281 : Zoom keyboard shortcuts on Firefox Keycode not consistent on FF : https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode Also added support for numpad +/- keys. --- src/js/service/keyboard/KeycodeTranslator.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/js/service/keyboard/KeycodeTranslator.js b/src/js/service/keyboard/KeycodeTranslator.js index 670b115..33cd12a 100644 --- a/src/js/service/keyboard/KeycodeTranslator.js +++ b/src/js/service/keyboard/KeycodeTranslator.js @@ -7,7 +7,15 @@ 40 : 'down', 46 : 'del', 189 : '-', + // 109 for numpad - + 109 : '-', + // 173 on Firefox for minus key + 173 : '-', 187 : '+', + // 107 for numpad + + 107 : '+', + // 61 on Firefox for =/+ key + 61 : '+', 188 : '<', 190 : '>' };