eventCommandKey

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the eventCommandKey
eventCommandKey()
Summary

Returns the state of the Command key.

Introduced8.1
OSmac, windows, linux
Platformsdesktop, server
Example
put the eventCommandKey into keyState
if the eventCommandKey is down then exit rawKeyDown
Values
NameTypeDescription
return

The eventCommandKey function returns down if the key was down at the time the current event was generated or up otherwise.

RelatedMessage: commandKeyDown
Function: controlKey, value, keysDown
Glossary: function, return, Command key
Control Structure: function
Description

Use the eventCommandKey function to check whether the Command key was pressed at the time the current event was dispatched.

If you want to check the state of the Command key at the current time, rather than when the event was dispatched, use the commandKey function.

On Unix and Windows systems, the eventCommandKey function returns the same value as the eventControlKey function: the two functions are synonyms.

Warning: the value of this function is undefined after performing a wait operation; it may no longer be the same as the value when the event was dispatched.

Tagsui