TTkKeyEvent🌶️
- class TTkKeyEvent(key: int | str, code: str, mod: int)[source]🌶️
Bases:
objectKeyboard event base class.
- Demo:
Parsed input is exposed as one of the concrete subclasses:
TTkKeyEvent_Characterfor literal character input andTTkKeyEvent_SpecialKeyfor translated terminal sequences.The shared
keyattribute stores the payload for the concrete event type: astrforTTkKeyEvent_Characterand anintTTkKconstant forTTkKeyEvent_SpecialKey.- Parameters:
code (str) – The terminal code used to represent this input
mod (
TTkConstant.KeyModifier) – The modifier used by theSpecialKeytype
- key: str | int🌶️
The parsed key payload for the concrete event instance.
- code: str🌶️
The terminal code used to represent this input
- mod: KeyModifier🌶️
The
TTkConstant.KeyModifierassociated with the input.
Methods🌶️