MCPcopy Index your code
hub / github.com/UI5/webcomponents / getCtrlKey

Function getCtrlKey

packages/base/src/Keys.ts:253–253  ·  view source on GitHub ↗
(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

251const hasModifierKeys = (event: KeyboardEvent): boolean => event.shiftKey || event.altKey || getCtrlKey(event);
252
253const getCtrlKey = (event: KeyboardEvent): boolean => !!(event.metaKey || event.ctrlKey); // double negation doesn't have effect on boolean but ensures null and undefined are equivalent to false.
254
255const checkModifierKeys = (event: KeyboardEvent, bCtrlKey: boolean, bAltKey: boolean, bShiftKey: boolean):boolean => event.shiftKey === bShiftKey && event.altKey === bAltKey && getCtrlKey(event) === bCtrlKey;
256

Callers 2

hasModifierKeysFunction · 0.85
checkModifierKeysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected