The KeyEvent class is passed as argument to the KEY_PRESS
and KEY_RELEASE events. The class contains the attributes
key, keycode and mods (see the constructor for
a description).
| key, keycode, mods=0) |
keycode is the code of the untranslated key that was pressed
or released. The values for common keys are defined in the keydefs
module (i.e. KEY_LEFT, KEY_UP, etc.).
mods contains the modifier flags which is a combination of
KEYMOD_SHIFT, KEYMOD_CONTROL, KEYMOD_ALT and
KEYMOD_META. The respective flag is set if the Shift, Control,
Alt or Meta key was pressed while the event key was pressed or released.
| ) |
True if the key is a Shift key (no matter if it is the
left or right key).
| ) |
True if the key is a Control key (no matter if it is the
left or right key).
| ) |
True if the key is an Alt key (no matter if it is the
left or right key).