MCPcopy Create free account
hub / github.com/cablehead/stacks / matchKeyEvent

Function matchKeyEvent

src/utils.ts:82–94  ·  view source on GitHub ↗
(
  event: KeyboardEvent,
  options: MatchKeyOptions,
)

Source from the content-addressed store, hash-verified

80}
81
82export function matchKeyEvent(
83 event: KeyboardEvent,
84 options: MatchKeyOptions,
85): boolean {
86 return (
87 (!options.key || event.key === options.key) &&
88 (!options.code || event.code === options.code) &&
89 event.shiftKey === !!options.shift &&
90 event.ctrlKey === !!options.ctrl &&
91 event.altKey === !!options.alt &&
92 event.metaKey === !!options.meta
93 );
94}

Callers 3

globalKeyHandlerFunction · 0.90
actions.tsxFile · 0.90
attemptActionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected