commandKeyDown | |||||||
Type | message | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | card, field | ||||||
Summary | Sent when a Command key combination (Control-key on Unix or Windows) is pressed. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux | ||||||
Platforms | desktop, server | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Keyword: control Control Structure: function Message: functionKey, enterKey, arrowKey, deleteKey, tabKey, backspaceKey, controlKeyDown, optionKeyDown, returnKey Object: button Function: commandKey, controlKey, menus Glossary: current card, key combination, handler, Windows, message, Command key, Mac OS, Unix, focus, active control | ||||||
Description | Handle the commandKeyDown message if you want to provide Command-key or Control-key shortcuts (other than those provided in menus and button accelerators). The commandKeyDown message is sent to the active (focused) control(glossary), or to the current card if no control is focused. If the Command key is pressed along with the Return, Tab, Backspace, Delete, or Enter key, with an arrow key, or with a function key, no commandKeyDown message is sent. Instead, the returnKey, tabKey, backspaceKey, deleteKey, enterKey, arrowKey or functionKey message is sent. To trap a combination such as Command-Return or Control-Return, use a returnKey handler and check the commandKey function inside the handler. *Cross-platform note:* On Mac OS systems, the commandKeyDown message is sent when the user presses a key while holding down the Command key. On Unix or Windowssystems, the commandKeyDown message is sent when the user presses the Control key, whether or not another key is pressed at the same time. | ||||||
Tags | ui |