Skip to main content

KeyboardEvent

Event payload for keyboard key-down notifications.

Delivered to flet.Page.on_keyboard_event.

Inherits: Event

Properties

  • alt - Whether Alt was pressed when the key event was emitted.
  • ctrl - Whether Control was pressed when the key event was emitted.
  • key - Human-readable key label for the pressed key.
  • meta - Whether Meta (Command/Windows) was pressed when the key event was emitted.
  • shift - Whether Shift was pressed when the key event was emitted.

Properties

altinstance-attribute

alt: bool

Whether Alt was pressed when the key event was emitted.

ctrlinstance-attribute

ctrl: bool

Whether Control was pressed when the key event was emitted.

keyinstance-attribute

key: str

Human-readable key label for the pressed key.

metainstance-attribute

meta: bool

Whether Meta (Command/Windows) was pressed when the key event was emitted.

shiftinstance-attribute

shift: bool

Whether Shift was pressed when the key event was emitted.