* Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus * styles visible.
(e: KeyboardEvent)
| 72 | * styles visible. |
| 73 | */ |
| 74 | function isValidKey(e: KeyboardEvent) { |
| 75 | // Control and Shift keys trigger when navigating back to the tab with keyboard. |
| 76 | return !( |
| 77 | e.metaKey || |
| 78 | (!isMac() && e.altKey) || |
| 79 | e.ctrlKey || |
| 80 | e.key === 'Control' || |
| 81 | e.key === 'Shift' || |
| 82 | e.key === 'Meta' |
| 83 | ); |
| 84 | } |
| 85 | |
| 86 | function handleKeyboardEvent(e: KeyboardEvent) { |
| 87 | hasEventBeforeFocus = true; |
no outgoing calls
no test coverage detected