7
7
modifiers can be found in :ref:`Acting on a Region <ActingonaRegion>` and :ref:`Low
8
8
Level Mouse and Keyboard Actions <LowLevelMouseAndKeyboardActions>`.
13
Methods where key modifiers can be used include: :py:meth:`click() <Region.click>`,
14
:py:meth:`dragDrop() <Region.dragDrop>` , :py:meth:`doubleClick()
15
<Region.doubleClick>` , :py:meth:`rightClick() <Region.rightClick>`,
16
:py:meth:`type() <Region.type>`.
18
**the oldies but goldies** ::
20
KEY_ALT, KEY_CTRL, KEY_SHIFT
22
**system specific Win/Mac** ::
25
KEY_META (a synonym for KEY_WIN or KEY_CMD on Windows and Mac respectively).
27
The modifier constants can be combined to the modifier parameter by either using "+" or "|", if more than one key modifier is needed. ::
29
type(Key.ESC, KEY_CTRL + KEY_ALT)
31
type(Key.ESC, KEY_CTRL | KEY_ALT)
33
They should **only** be used in the
34
modifiers parameter with functions like :py:meth:`type() <Region.type>`, :py:meth:`rightClick() <Region.rightClick>`, etc.
36
They should **never** be used with :py:meth:`keyDown() <Region.keyDown>` or :py:meth:`keyUp() <Region.keyUp>`.
38
*Note for Java programming*: These constants are mapped to the according constants of the Java environment
39
in the class ``java.awt.event.InputEvent``.
58
27
ENTER, TAB, ESC, BACKSPACE, DELETE, INSERT
29
.. versionadded:: X1.0-rc3
31
**miscellanous keys** ::
60
35
**function keys** ::
62
37
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15
79
54
NUM0, NUM1, NUM2, NUM3, NUM4, NUM5, NUM6, NUM7, NUM8, NUM9
80
55
SEPARATOR, ADD, MINUS, MULTIPLY, DIVIDE
84
59
ALT, CMD, CTRL, META, SHIFT, WIN
86
These key modifiers can **not** be used with functions
61
These modifier keys **cannot** be used as a key modifier with functions
87
62
like :py:meth:`type() <Region.type>`, :py:meth:`rightClick() <Region.rightClick>`, etc.
89
63
They can **only** be used with :py:meth:`keyDown() <Region.keyDown>` and :py:meth:`keyUp() <Region.keyUp>`.
64
If you need key modifiers, use :py:class:`KeyModifier` instead.
69
Methods where key modifiers can be used include: :py:meth:`click() <Region.click>`,
70
:py:meth:`dragDrop() <Region.dragDrop>` , :py:meth:`doubleClick()
71
<Region.doubleClick>` , :py:meth:`rightClick() <Region.rightClick>`,
72
:py:meth:`type() <Region.type>`.
74
.. deprecated:: X1.0-rc3
76
**the oldies but goldies** ::
78
KEY_ALT, KEY_CTRL, KEY_SHIFT
80
**system specific Win/Mac** ::
83
KEY_META (a synonym for KEY_WIN or KEY_CMD on Windows and Mac respectively).
85
The old modifiers with a *KEY_* prefix are deprecated. Use ``KeyModifier.CTRL``, ``KeyModifier.ALT``, ``KeyModifier.SHIFT``, ``KeyModifier.META`` instead.
88
.. versionadded:: X1.0-rc3
89
.. py:class:: KeyModifier
91
Usage: `KeyModifier.CONSTANT` (where CONSTANT is one of the following key names).
94
equivalent to the old KEY_CTRL
96
equivalent to the old KEY_SHIFT
98
equivalent to the old KEY_ALT
100
equivalent to the old KEY_META
102
equivalent to the old KEY_CMD (and KEY_META)
104
equivalent to the old KEY_WIN (and KEY_META)
107
The modifier constants can be combined to the modifier parameter by either using "+" or "|", if more than one key modifier is needed. ::
109
type(Key.ESC, KeyModifier.CTRL + KeyModifier.ALT)
111
type(Key.ESC, KeyModifier.CTRL | KeyModifier.ALT)
113
They should **only** be used in the
114
modifiers parameter with functions like :py:meth:`type() <Region.type>`, :py:meth:`rightClick() <Region.rightClick>`, etc.
116
They should **never** be used with :py:meth:`keyDown() <Region.keyDown>` or :py:meth:`keyUp() <Region.keyUp>`.
118
*Note for Java programming*: These constants are mapped to the according constants of the Java environment
119
in the class ``java.awt.event.InputEvent``.