slint::language::KeyEvent Struct
struct KeyEvent;C++
#include <slint.h>C++
This structure is generated and passed to the key press and release callbacks of the FocusScope element.
Public Attributes
Section titled “Public Attributes”SharedString slint::language::KeyEvent::text
The unicode representation of the key pressed.
physical_key
Section titled “ physical_key”SharedString slint::language::KeyEvent::physical_key
The physical key that was pressed, if the backend can report it.
This uses the same names as @physical-keys(...), for example A, Digit1, or LeftArrow. It is empty when the backend doesn’t provide physical key information.
modifiers
Section titled “ modifiers”KeyboardModifiers slint::language::KeyEvent::modifiers
The keyboard modifiers active at the time of the key press event.
repeat
Section titled “ repeat”bool slint::language::KeyEvent::repeat
This field is set to true for key press events that are repeated, i.e. the key is held down. It’s always false for key release events.
© 2026 SixtyFPS GmbH