ComponentRef

Key Press

KeyPress

Test keyboard input, and executes a component list if a key is pressed.

Properties

Keys

A string of characters for which keypresses will be detected. Use capital letters. To test for the "A"-key just set the value "A". If several characters are set, then the KeyIndex-property will be set to the index of which character was pressed. For instance if keys are set to "QA" then if the Q-key is pressed KeyIndex will have the value 0, and if the A-key is pressed it will have the value 1.

Special characters and their meaning:
"{" left mouse button.
"|" middle mouse button.
"}" right mouse button.
"^" cursor up.
"_" cursor down.
"<" cursor left.
">" cursor right.

CharCode

This is a alternate way of specifying which key to detect.

Example values and their meaning:
9 : Tab
13 : Return
16 : Shift
17 : Control

Note: To use the CharCode-property the Keys-property must be blank. They cannot be combined. Also character codes are not guaranteed to be consistent on other platforms (Mac and Linux).

RepeatDelay

A delay in seconds for which a keypress is repeated.

OnPressed

The list of components that is executed when a keypress is detected.

KeyIndex

See the description for Keys-property.

Green Marinee theme adapted by David Gilbert, powered by PmWiki