diff options
| author | Stephen Blott | 2016-10-02 12:33:00 +0100 |
|---|---|---|
| committer | GitHub | 2016-10-02 12:33:00 +0100 |
| commit | c370855afd2f9f4123de3e9d2d8492c036a605b6 (patch) | |
| tree | cfb34113abb44bb8745828c7d932efe497d9b7c9 /lib/keyboard_utils.coffee | |
| parent | d439a13afd1569548e62def33278f31b258984db (diff) | |
| parent | 54139c11231bf7e7a3a9f4c98fb688d2d0fe22c9 (diff) | |
| download | vimium-c370855afd2f9f4123de3e9d2d8492c036a605b6.tar.bz2 | |
Merge pull request #2289 from smblott-github/rework-key-parsing
Rework key-sequence parsing.
Diffstat (limited to 'lib/keyboard_utils.coffee')
| -rw-r--r-- | lib/keyboard_utils.coffee | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/keyboard_utils.coffee b/lib/keyboard_utils.coffee index dabf864d..f0e791d4 100644 --- a/lib/keyboard_utils.coffee +++ b/lib/keyboard_utils.coffee @@ -111,9 +111,10 @@ KeyboardUtils = modifiers = [] keyChar = keyChar.toUpperCase() if event.shiftKey - modifiers.push "m" if event.metaKey - modifiers.push "c" if event.ctrlKey + # These must be in alphabetical order (to match the sorted modifier order in Commands.normalizeKey). modifiers.push "a" if event.altKey + modifiers.push "c" if event.ctrlKey + modifiers.push "m" if event.metaKey keyChar = [modifiers..., keyChar].join "-" if 1 < keyChar.length then "<#{keyChar}>" else keyChar |
