Keyboard.CommandKey

From Xojo Documentation

Read-Only Property (As Boolean )
BooleanValue = aKeyboard.CommandKey

Supported for all project types and targets.

If True, the Command key is depressed on Macintosh (or Windows/OS key on Windows/Linux) when the current method or event handler began.

Sample Code

The following code detects whether the Command key is depressed. The code is in the Action event of a Timer.

If Keyboard.CommandKey Then
// handle the keyboard event here....
MessageBox("keyboard event detected...")
End If