(parsedHotkey: ParsedHotkey)
| 28 | * Ctrl/Meta shortcuts and Escape fire in inputs; single keys and Shift/Alt combos are ignored. |
| 29 | */ |
| 30 | export function getDefaultIgnoreInputs(parsedHotkey: ParsedHotkey): boolean { |
| 31 | if (parsedHotkey.ctrl || parsedHotkey.meta) return false // Mod+S, Ctrl+C, etc. |
| 32 | if (parsedHotkey.key === 'Escape') return false // Close modal, etc. |
| 33 | return true // Single keys, Shift+key, Alt+key |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Checks if an element is an input-like element that should be ignored for hotkeys. |
no outgoing calls
no test coverage detected
searching dependent graphs…