Keyboard.OptionKey

From Xojo Documentation

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

Supported for all project types and targets.

If True, the Alt key (Windows and Linux) or Option key (MacOS) is depressed when the method/event began.

Sample Code

This code detects whether the Option key was depressed. The code is in the Action event of a Timer:

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