diff options
| author | Stephen Blott | 2017-09-01 16:48:35 +0100 |
|---|---|---|
| committer | Stephen Blott | 2017-09-01 16:48:35 +0100 |
| commit | 1358fff3981cab5d8e0aa273cca2378aca2d766c (patch) | |
| tree | 47cc4e2d96615e6bc8205d382ef4a1875b432adf | |
| parent | bbad2739341c59e4b1eb413dd52a4cf7b9159fd8 (diff) | |
| download | vimium-1358fff3981cab5d8e0aa273cca2378aca2d766c.tar.bz2 | |
Handle shifted numeric keys.
| -rw-r--r-- | lib/keyboard_utils.coffee | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/keyboard_utils.coffee b/lib/keyboard_utils.coffee index 471e18c9..4b03aeed 100644 --- a/lib/keyboard_utils.coffee +++ b/lib/keyboard_utils.coffee @@ -23,7 +23,6 @@ KeyboardUtils = key = event.code # Strip some standard prefixes. key = key[3..] if key[...3] == "Key" - key = key[5..] if key[...5] == "Digit" key = key[6..] if key[...6] == "Numpad" # Translate some special keys to event.key-like strings. if @enUsTranslations[key] @@ -83,6 +82,16 @@ KeyboardUtils = "Period": [".", ">"] "Slash": ["/", "?"] "Space": [" ", " "] + "Digit1": ["1", "!"] + "Digit2": ["2", "@"] + "Digit3": ["3", "#"] + "Digit4": ["4", "$"] + "Digit5": ["5", "%"] + "Digit6": ["6", "^"] + "Digit7": ["7", "&"] + "Digit8": ["8", "*"] + "Digit9": ["9", "("] + "Digit0": ["0", ")"] KeyboardUtils.init() |
