TKeyEvents

TKeyEvents🌶️

class TKeyEvents[source]🌶️

Bases: object

Methods🌶️

keyEvent(evt: TTkKeyEvent) → bool[source]🌶️

This event handler, can be reimplemented in a subclass to receive key events for the widget.

Note

Reimplement this function to handle this event

The received event is a TTkKeyEvent_Character for literal text input or a TTkKeyEvent_SpecialKey for translated terminal sequences such as arrows, Enter, or function keys.

Parameters:

evt (TTkKeyEvent) – The keyboard event.

Returns:

True if the event has been handled.

Return type:

bool