* class Key *
Applicable usage situations for these predefined constants of special keys and key modifiers can be found in Acting on a
Low Level Mouse and Keyboard Actions.
The methods supporting the use of special keys are
(where CONSTANT is one of the following key names, uppercase mandatory).
String concatenation with with other text or other key constants is possible using
`` + `_`.
:::Note The status ( on / off ) of the keys Key.CAPS_LOCK, Key.NUM_LOCK and Key.SCROLL_LOCK can be evaluated with the method Env.isLockOn(). :::
A key is called a modifier key, when it is used in conjunction with other keys by pressing and holding it while typing the other keys. The keys used most commonly as modifier keys are SHIFT, ALT (left alt key, CTRL (might be strg on Windows) and the CMD key (Apple key on OS X). On Windows you additionally have the Windows key and the alt key on the right.
type() command has 2 parameters:
- parameter 1: the keys, that should be pressed/released one after the other
- parameter 2: the modifier keys, that alltogether should be pressed and held during the typing and released at the end.
For parameter 2 there are 2 options:
- new version: (a key is a key ;-): Key.XXX
- old version (kept for upwards compatibility): KeyModifier.XXX
… and these early versions should not be used anymore
The modifier keys can be combined using
`` + `_`, if more than one key modifier is needed.
Note for Java programming:
These constants are mapped to the according constants of