eventAltKey

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the eventAltKey
eventAltKey()
Synonymseventoptionkey
Summary

Returns the state of the Alt key.

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

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

RelatedConstant: return
Message: optionKeyDown
Function: eventOptionKey, value, keysDown, altKey
Control Structure: function
Glossary: Meta key, return, function, Alt key
Description

Use the eventAltKey function to check whether the Alt key, Meta key, or Option key was pressed at the time the current event was dispatched. You can use eventAltKey to add alternative capabilities to user actions such as clicking.

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

The eventAltKey and eventOptionKey functions return the same value. Which one to use is a matter of preference. The terminology varies depending on platform. Users of different operating systems may know this key as the Option key (Mac OS systems), Meta key (Unix systems), or Alt key (Windows systems).

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