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

Function checkModifierKeys

packages/base/src/Keys.ts:255–255  ·  view source on GitHub ↗
(event: KeyboardEvent, bCtrlKey: boolean, bAltKey: boolean, bShiftKey: boolean)

Source from the content-addressed store, hash-verified

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
257const isNumber = (event: KeyboardEvent): boolean => ((event.key ? "0123456789".indexOf(event.key) !== -1 : event.keyCode >= KeyCodes.DIGIT_0 && event.keyCode <= KeyCodes.DIGIT_9) && checkModifierKeys(event, false, false, false));
258

Callers 15

isEnterCtrlFunction · 0.85
isEnterAltFunction · 0.85
isEnterShiftFunction · 0.85
isCtrlFunction · 0.85
isSpaceShiftFunction · 0.85
isSpaceCtrlFunction · 0.85
isLeftCtrlFunction · 0.85
isRightCtrlFunction · 0.85
isUpCtrlFunction · 0.85
isDownCtrlFunction · 0.85
isUpShiftFunction · 0.85
isDownShiftFunction · 0.85

Calls 1

getCtrlKeyFunction · 0.85

Tested by

no test coverage detected