* Checks if a key matches any of the bindings for a command
( command: Command, key: Key, config: KeyBindingConfig = defaultKeyBindings, )
| 62 | * Checks if a key matches any of the bindings for a command |
| 63 | */ |
| 64 | function matchCommand( |
| 65 | command: Command, |
| 66 | key: Key, |
| 67 | config: KeyBindingConfig = defaultKeyBindings, |
| 68 | ): boolean { |
| 69 | const bindings = config[command]; |
| 70 | return bindings.some((binding) => matchKeyBinding(binding, key)); |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Key matcher function type |
no test coverage detected