XPLMKeyFlags

These bitfields define modifier keys in a platform independent way. When a key is pressed, a series of messages are sent to your plugin. The down flag is set in the first of these messages, and the up flag in the last. While the key is held down, messages are sent with neither to indicate that the key is being held down as a repeated character.

The control flag is mapped to the control flag on Macintosh and PC. Generally X-Plane uses the control key and not the command key on Macintosh, providing a consistent interface across platforms that does not necessarily match the Macintosh user interface guidelines. There is not yet a way for plugins to access the Macintosh control keys without using #ifdefed code.

NameValueDescription
xplm_ShiftFlag1 The shift key is down
xplm_OptionAltFlag2 The option or alt key is down
xplm_ControlFlag 4 The control key is down*
xplm_DownFlag8 The key is being pressed down
xplm_UpFlag16 The key is being released