TTkKeyEvent🌶️

class TTkKeyEvent(type: int, key: str, code: str, mod: int)[source]🌶️

Bases: object

Keyboard Events

Demo:

test.input.py

Parameters:
  • type (TTkConstant.KeyType) – The key input type recorded

  • key (str) – the key

  • code (str) – The terminal code used to represent this input

  • mod (TTkConstant.KeyModifier) – The modifier used by the SpecialKey type

type: KeyType🌶️

The key input TTkConstant.KeyType recorded

key: str🌶️

the input key

code: str🌶️

The terminal code used to represent this input

mod: KeyModifier🌶️

The TTkConstant.KeyModifier used by the SpecialKey type

Methods🌶️

static parse(input_key)[source]🌶️

TTkKeyEvent Attributes🌶️