ViewKeyDownScript
view:ViewKeyDownScript(char, flags)
Sent by the system when a user presses down a keyboard key.
DISCUSSION
- char
- The character that was entered on the keyboard. Note that if a modifier key is the only key pressed (for example, the Shift key), this value will be
0
.
- flags
- A 30-bit integer that specifies which modifier keys were pressed and other additional information. The use of the individual bits in this value are shown in Table 4-14.
- return value
- Your implementation must return
nil
if you want the system to continue processing the keystroke.
Table 4-14 shows how the bits in the flags parameter are used for the key event scripts.
Table 4-14 Key event-processing script flags
Bits Description 0 to 7 The keycode. 8 to 23 The 16-bit character that would be inserted if none of the modifier keys were pressed. 24 Indicates whether the key was delivered from an on-screen keyboard. ( kIsSoftKeyboard
)25 Indicates that the Command key was down. ( kCommandModifier
)26 Indicates that the Shift key was down. ( kShiftModifier
)27 Indicates that the Caps Lock key was down. ( kCapsLockModifier
)28 Indicates that the Option key was down. ( kOptionsModifier
)29 Indicates that the Control key was down. ( kControlModifier
)
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help