keysDown

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the keysDown
keysDown()
Summary

Returns a list of the keys currently being pressed.

Introduced1.1
OSmac, windows, linux
Platformsdesktop, server
Example
the keysDown
if myKey is in the keysDown then exit to top
Values
NameTypeDescription
return

The keysDown function returns a list of keycodes of pressed keys, separated by commas if more than one key is being pressed.

RelatedMessage: rawKeyUp, keyUp, rawKeyDown, keyDown, controlKeyDown
Function: shiftKey, altKey, capsLockKey, optionKey, commandKey, controlKey
Glossary: return, keycode, handler, execute, pass, message, parameter
Control Structure: function
Description

Use the keysDown function to respond to a keypress while a handler is being executed.

The keycodes returned by the keysDown function are the same as those passed as parameters with the rawKeyDown and rawKeyUp messages.

The keysDown function returns empty if no keys are being pressed.

Tagsui