keyDown | |||||||
Type | message | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | card, field | ||||||
Summary | Sent when the user presses a key. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Keyword: field Property: emacsKeyBindings, extendKey, powerKeys Message: rawKeyDown, commandKeyDown, returnKey, enterInField, controlKeyDown, arrowKey, backspaceKey, tabKey, functionKey, enterKey, deleteKey, keyUp, optionKeyDown, escapeKey Command: focus Function: keysDown Glossary: handler, character, pass, message, trap | ||||||
Description | Handle the keyDown message if you want to do something special when the user presses any key or a particular key you check for in the handler. The message is sent to the active (focused) control, or to the current card if no control is focused. If the key pressed is the Return, Tab, Backspace, Delete, or Enter key, an arrow key, or a function key, no keyDown message is sent. Instead, the returnKey, tabKey, backspaceKey, deleteKey, enterKey, arrowKey, or functionKey message is sent. If the insertion point is in a field, the entry of typed characters is triggered by the keyDown message. This means that trapping the keyDown message and not passing it prevents typing from being entered in the field.
| ||||||
Tags | ui |