- class neoscore.core.key_event.KeyEventType
Enum describing keyboard input event types.
The enum integer values are arbitrary and may change in the future.
- PRESS = 1
A key was pressed
- AUTO_REPEAT = 2
A key was automatically repeated from being held
- RELEASE = 3
A key was released
- class neoscore.core.key_event.KeyEvent
A keyboard input event.
For printable keys, the easiest way to read a key press is by the
textfield. For non-printing keys like arrow keys, you can check the pressed key with the
- code: int
The platform-independent key code for the pressed key.
This key code corresponds to Qt’s platform-independent key map. For convenience, a few common key codes are provided here:
Note that this does not differentiate letter capitalization; check the active modifier keys or the
textfield to determine capitalization.
- modifiers: int
A bitmask of key modifiers active during this event.
The modifier flags in this bitmask correspond to Qt’s modifier map.
- text: str
The unicode text generated by this key.
This may be empty for keystrokes that do not emit text, such as modifiers.