rawKeyDown | |||||||
Type | message | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | field | ||||||
Summary | Sent when the user presses any key. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: character Message: optionKeyDown Function: keysDown Glossary: object, pass, control, focus, active control, event, mouse pointer, field, message path, trap, Mac OS, current card, message, modifier key, handler Control Structure: pass | ||||||
Description | Handle the rawKeyDown message if you want to intercept raw events from the keyboard, or from a mouse wheel, or if you want to handle keys that aren't mapped to any character. If the rawKeyDown handler does not pass the message or send it to a further object in the message path, the keypress has no effect. Passing the message allows the keypress to have its normal effect. A rawKeyDown message is also sent when the user moves the mouse wheel on a scrolling mouse; in this case, the message is sent to the control under the mouse pointer. If the insertion point is in a field, the entry of typed characters is triggered by the rawKeyDown message. This means that trapping the rawKeyDown message and not Passing it prevents typing from being entered in the field. *Cross-platform note:* On Mac OS systems, no message is sent when a modifier key (Shift, Option, Control, or Command) is pressed, unless another key is pressed along with the modifier key. Mouse wheels do not send a rawKeyDown message on Mac OS systems. | ||||||
Tags | ui |