Keyboard.OSKey

From Xojo Documentation

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

New in 2005r1

Supported for all project types and targets.

If True, the OS key was depressed when the current method or event handler began. On Windows and Linux, this is the Windows flag key; on Macintosh, it is the Command key.

Example

This example detects whether the OS key was depressed on the user’s platform. The code is in the Action event of a Timer.

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