Keyboard.AsyncCommandKey

From Xojo Documentation

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

Supported for all project types and targets.

If True, the Command key (Macintosh) is depressed.

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