O'Reilly logo

Lingo in a Nutshell by Bruce A. Epstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Keyboard Properties

Table 10-2 summarizes system properties regarding the current keyboard state and the last key typed. Note that there is no property to indicate whether a non-modifier key is currently being pressed (although you would ordinarily receive repeated keyDown events during this time). That is, there is no the keyDown property. Refer to the Xtras cited under "Keyboard Xtras" later in this chapter to detect whether a non-modifier key is currently being pressed.

Table 10-2. Keyboard System Properties and Constants

Property Name

Usage

[a]
[b]

BACKSPACE

Constant indicating the Backspace key at the upper right of the main keyboard (marked “delete” or with an arrow on most keyboards).

the boxType of member

Limits the size of keyboard input fields (possible values are #adjust, #limit, #fixed, and #scroll). See Chapter 12 in Director in a Nutshell.

charToNum (the key)

The ASCII value[a] of the last key pressed.

the commandDown

Boolean indicating whether the Command key (Mac) or the Control key (Windows) is being pressed.

the controlDown

Boolean indicating whether the Control key (either platform) is being pressed.

the emulateMultiButtonMouse

Boolean indicating whether to treat Control-clicks on the Macintosh as equivalent to right mouse clicks on Windows. See Chapter 9.

ENTER

Constant indicating the Enter key on the numeric keypad only.

RETURN

Constant indicating the Return key on the main keyboard (usually marked "Enter" on PC keyboards).

the exitLock

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required