This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathkeyDown.lcdoc
More file actions
66 lines (48 loc) · 2.11 KB
/
keyDown.lcdoc
File metadata and controls
66 lines (48 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Name: keyDown
Type: message
Syntax: keyDown <pKeyName>
Summary:
Sent when the user presses a key.
Associations: card, field
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
on keyDown theKey
if theKey is not a number then beep
else pass keyDown
end keyDown
Parameters:
pKeyName:
The actual character of the pressed key.
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 <trap|trapping>
the <keyDown> <message> and not <pass|passing> it prevents typing from
being entered in the <field>.
>*Note:* The <keyDown> <message> is sent before the <character> is
> placed in the <field>, so if you need to use the new content of the
> <field>, handle the <keyUp> <message> instead.
>*Note:* The <keydown> message is not sent when either of the Option,
> Control or Command keys are down. In this case, first a <rawKeyDown
> message> is sent, then one of <optionKeyDown>, <controlKeyDown> or
> <commandKeyDown> is sent instead of <keydown>.
References: focus (command), keysDown (function), handler (glossary),
character (glossary), pass (glossary), message (glossary),
trap (glossary), field (keyword), rawKeyDown (message),
commandKeyDown (message), returnKey (message), enterInField (message),
controlKeyDown (message), arrowKey (message), backspaceKey (message),
tabKey (message), functionKey (message), enterKey (message),
deleteKey (message), keyUp (message), optionKeyDown (message),
escapeKey (message), emacsKeyBindings (property), extendKey (property),
powerKeys (property)
Tags: ui