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

Function isCtrlKeyPressed

packages/react-aria/src/utils/keyboard.tsx:324–326  ·  view source on GitHub ↗
(event: KeyPressEvent)

Source from the content-addressed store, hash-verified

322}
323
324export function isCtrlKeyPressed(event: KeyPressEvent): boolean {
325 return isMac() ? event.metaKey : event.ctrlKey;
326}
327
328export function isKeyboardOpen(): boolean {
329 return state.isOpen;

Callers 4

onSelectFunction · 0.90
homeFunction · 0.90
endFunction · 0.90
onKeyDownFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected