* Return whether a native keypress event is assumed to be a command. * This is required because Firefox fires `keypress` events for key commands * (cut, copy, select-all, etc.) even though no character is inserted.
(nativeEvent)
| 3334 | * (cut, copy, select-all, etc.) even though no character is inserted. |
| 3335 | */ |
| 3336 | function isKeypressCommand(nativeEvent) { |
| 3337 | return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && |
| 3338 | // ctrlKey && altKey is equivalent to AltGr, and is not a command. |
| 3339 | !(nativeEvent.ctrlKey && nativeEvent.altKey); |
| 3340 | } |
| 3341 | |
| 3342 | /** |
| 3343 | * Translate native top level events into event types. |
no outgoing calls
no test coverage detected