Sprotty
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Function.Is Ctrl or Cmd

sprotty / isCtrlOrCmd

Function: isCtrlOrCmd()

isCtrlOrCmd(event): boolean

Defined in: packages/sprotty/src/utils/browser.ts:23

Returns whether the mouse or keyboard event includes the CMD key on Mac or CTRL key on Linux / others.

Parameters

event

KeyboardEvent | MouseEvent

Returns

boolean