KeyDownEvent
Event triggered when a key is pressed down.
Typically used to detect the initial press of a key before it is released or repeated.
Inherits: Event
Properties
key- The key that was pressed down, such asA,ENTERorSHIFT_LEFT.physical_key- The position of the key that was pressed down on the keyboard, such asW, whatever the active layout.
Properties
keyinstance-attribute
key: KeyboardKey | strThe key that was pressed down, such as A,
ENTER or SHIFT_LEFT.
A key that has no KeyboardKey member is a plain string,
such as "Ü".
physical_keyinstance-attribute
physical_key: PhysicalKeyboardKey | intThe position of the key that was pressed down on the keyboard, such as
W, whatever the active layout.
A key that has no PhysicalKeyboardKey member is its USB HID
usage code.