MCPcopy
hub / github.com/jamiebuilds/tinykeys / defaultKeybindingsHandlerIgnore

Function defaultKeybindingsHandlerIgnore

src/tinykeys.ts:133–145  ·  view source on GitHub ↗
(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

131 * are the current target.
132 */
133export function defaultKeybindingsHandlerIgnore(event: KeyboardEvent) {
134 let target = event.target as HTMLElement
135 return (
136 // Always ignore repeated keyboard events
137 event.repeat ||
138 // Always ignore keyboard events during composition input
139 event.isComposing ||
140 // Always allow the current target
141 (target !== event.currentTarget &&
142 // Ignore contenteditable and form elements
143 target.matches("[contenteditable],input,select,textarea"))
144 )
145}
146
147/**
148 * There's a bug in Chrome that causes event.getModifierState not to exist on

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…