* There's a bug in Chrome that causes event.getModifierState not to exist on * KeyboardEvent's for F1/F2/etc keys.
(event: KeyboardEvent, mod: string)
| 149 | * KeyboardEvent's for F1/F2/etc keys. |
| 150 | */ |
| 151 | function getModifierState(event: KeyboardEvent, mod: string) { |
| 152 | return typeof event.getModifierState === "function" |
| 153 | ? event.getModifierState(mod) || |
| 154 | (ALT_GRAPH_ALIASES.includes(mod) && event.getModifierState("AltGraph")) |
| 155 | : false |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * Parses a keybinding string into its parts. |
no outgoing calls
no test coverage detected
searching dependent graphs…