Page-level keyboard shortcuts: only real text fields should swallow keys
A window keydown shortcut map that bails on every INPUT/SELECT tag goes dead after a mouse click on a range slider, checkbox or dropdown, because focus stays on that control. Classify by the element's type instead: text-like inputs (including a bare input and unknown types), textarea and contenteditable keep all keys; range, checkbox, radio and select do not. Keep Space away from the shortcut only where Space has a native job (button, checkbox, radio, button-like inputs), otherwise the toggle is doubled. If two listeners (capture and bubble) apply this rule, share one predicate, and expect older tests that pinned 'SELECT keeps Esc' to need updating. In jsdom, dispatching keydown on a focused button does not synthesize a click, so such tests only prove the shortcut map left the key alone.