MCPcopy Create free account
hub / github.com/adobe/react-spectrum / isCtrlKeyPressed

Function isCtrlKeyPressed

packages/react-aria/src/utils/keyboard.tsx:21–27  ·  view source on GitHub ↗
(e: Event)

Source from the content-addressed store, hash-verified

19}
20
21export function isCtrlKeyPressed(e: Event): boolean {
22 if (isMac()) {
23 return e.metaKey;
24 }
25
26 return e.ctrlKey;
27}
28
29// HTML input types that do not cause the software keyboard to appear.
30const nonTextInputTypes = new Set([

Callers 3

onSelectFunction · 0.90
onKeyDownFunction · 0.90
onKeyDownFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected