Function
adaptKeyboardEvent
(e: ReactKeyboardEvent<HTMLDivElement>)
Source from the content-addressed store, hash-verified
| 80 | } |
| 81 | |
| 82 | function adaptKeyboardEvent(e: ReactKeyboardEvent<HTMLDivElement>): WebKeyboardEvent { |
| 83 | return { |
| 84 | key: e.key, |
| 85 | ctrl: e.ctrlKey, |
| 86 | shift: e.shiftKey, |
| 87 | meta: e.metaKey || e.altKey, |
| 88 | stopImmediatePropagation() { |
| 89 | e.stopPropagation() |
| 90 | }, |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | // --------------------------------------------------------------------------- |
| 95 | // Component |
Tested by
no test coverage detected