( event: KeyboardEvent, options: MatchKeyOptions, )
| 80 | } |
| 81 | |
| 82 | export function matchKeyEvent( |
| 83 | event: KeyboardEvent, |
| 84 | options: MatchKeyOptions, |
| 85 | ): boolean { |
| 86 | return ( |
| 87 | (!options.key || event.key === options.key) && |
| 88 | (!options.code || event.code === options.code) && |
| 89 | event.shiftKey === !!options.shift && |
| 90 | event.ctrlKey === !!options.ctrl && |
| 91 | event.altKey === !!options.alt && |
| 92 | event.metaKey === !!options.meta |
| 93 | ); |
| 94 | } |
no outgoing calls
no test coverage detected