* Extract modifiers from an Ink Key object. * This function ensures we're explicitly extracting the modifiers we care about.
(key: Key)
| 13 | * This function ensures we're explicitly extracting the modifiers we care about. |
| 14 | */ |
| 15 | function getInkModifiers(key: Key): InkModifiers { |
| 16 | return { |
| 17 | ctrl: key.ctrl, |
| 18 | shift: key.shift, |
| 19 | meta: key.meta, |
| 20 | super: key.super, |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Extract the normalized key name from Ink's Key + input. |