slint::platform::key_codes Namespace
This namespace contains constants for each special non-printable key.
Each constant can be converted to SharedString. The constants are meant to be used with the slint::Window::dispatch_key_press_event() and slint::Window::dispatch_key_release_event() functions.
Example:
window.dispatch_key_press_event(slint::platform::key_codes::Tab);Variables
Section titled “Variables” Backspace
Section titled “ Backspace”constexpr std::u8string_view slint::platform::key_codes::Backspace
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Tab
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Return
Section titled “ Return”constexpr std::u8string_view slint::platform::key_codes::Return
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Escape
Section titled “ Escape”constexpr std::u8string_view slint::platform::key_codes::Escape
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Backtab
Section titled “ Backtab”constexpr std::u8string_view slint::platform::key_codes::Backtab
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Delete
Section titled “ Delete”constexpr std::u8string_view slint::platform::key_codes::Delete
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Shift
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Control
Section titled “ Control”constexpr std::u8string_view slint::platform::key_codes::Control
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Alt
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::AltGr
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
CapsLock
Section titled “ CapsLock”constexpr std::u8string_view slint::platform::key_codes::CapsLock
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
ShiftR
Section titled “ ShiftR”constexpr std::u8string_view slint::platform::key_codes::ShiftR
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
ControlR
Section titled “ ControlR”constexpr std::u8string_view slint::platform::key_codes::ControlR
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Meta
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::MetaR
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Space
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
UpArrow
Section titled “ UpArrow”constexpr std::u8string_view slint::platform::key_codes::UpArrow
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
DownArrow
Section titled “ DownArrow”constexpr std::u8string_view slint::platform::key_codes::DownArrow
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
LeftArrow
Section titled “ LeftArrow”constexpr std::u8string_view slint::platform::key_codes::LeftArrow
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
RightArrow
Section titled “ RightArrow”constexpr std::u8string_view slint::platform::key_codes::RightArrow
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F1
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F2
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F3
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F4
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F5
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F6
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F7
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F8
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F9
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F10
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F11
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F12
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F13
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F14
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F15
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F16
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F17
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F18
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F19
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F20
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F21
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F22
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F23
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F24
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Insert
Section titled “ Insert”constexpr std::u8string_view slint::platform::key_codes::Insert
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Home
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::End
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
PageUp
Section titled “ PageUp”constexpr std::u8string_view slint::platform::key_codes::PageUp
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
PageDown
Section titled “ PageDown”constexpr std::u8string_view slint::platform::key_codes::PageDown
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
ScrollLock
Section titled “ ScrollLock”constexpr std::u8string_view slint::platform::key_codes::ScrollLock
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Pause
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
SysReq
Section titled “ SysReq”constexpr std::u8string_view slint::platform::key_codes::SysReq
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Stop
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Menu
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Back
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::A
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::B
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::C
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::D
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::E
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::F
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::G
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::H
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::I
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::J
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::K
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::L
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::M
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::N
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::O
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::P
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Q
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::R
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::S
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::T
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::U
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::V
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::W
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::X
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Y
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Z
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit0
Section titled “ Digit0”constexpr std::u8string_view slint::platform::key_codes::Digit0
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit1
Section titled “ Digit1”constexpr std::u8string_view slint::platform::key_codes::Digit1
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit2
Section titled “ Digit2”constexpr std::u8string_view slint::platform::key_codes::Digit2
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit3
Section titled “ Digit3”constexpr std::u8string_view slint::platform::key_codes::Digit3
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit4
Section titled “ Digit4”constexpr std::u8string_view slint::platform::key_codes::Digit4
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit5
Section titled “ Digit5”constexpr std::u8string_view slint::platform::key_codes::Digit5
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit6
Section titled “ Digit6”constexpr std::u8string_view slint::platform::key_codes::Digit6
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit7
Section titled “ Digit7”constexpr std::u8string_view slint::platform::key_codes::Digit7
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit8
Section titled “ Digit8”constexpr std::u8string_view slint::platform::key_codes::Digit8
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Digit9
Section titled “ Digit9”constexpr std::u8string_view slint::platform::key_codes::Digit9
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Circumflex
Section titled “ Circumflex”constexpr std::u8string_view slint::platform::key_codes::Circumflex
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Exclamation
Section titled “ Exclamation”constexpr std::u8string_view slint::platform::key_codes::Exclamation
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
DoubleQuote
Section titled “ DoubleQuote”constexpr std::u8string_view slint::platform::key_codes::DoubleQuote
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Hash
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Dollar
Section titled “ Dollar”constexpr std::u8string_view slint::platform::key_codes::Dollar
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Percent
Section titled “ Percent”constexpr std::u8string_view slint::platform::key_codes::Percent
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Ampersand
Section titled “ Ampersand”constexpr std::u8string_view slint::platform::key_codes::Ampersand
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Underscore
Section titled “ Underscore”constexpr std::u8string_view slint::platform::key_codes::Underscore
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
OpenParen
Section titled “ OpenParen”constexpr std::u8string_view slint::platform::key_codes::OpenParen
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
CloseParen
Section titled “ CloseParen”constexpr std::u8string_view slint::platform::key_codes::CloseParen
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Asterisk
Section titled “ Asterisk”constexpr std::u8string_view slint::platform::key_codes::Asterisk
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Plus
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Pipe
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
HyphenMinus
Section titled “ HyphenMinus”constexpr std::u8string_view slint::platform::key_codes::HyphenMinus
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
OpenCurlyBracket
Section titled “ OpenCurlyBracket”constexpr std::u8string_view slint::platform::key_codes::OpenCurlyBracket
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
CloseCurlyBracket
Section titled “ CloseCurlyBracket”constexpr std::u8string_view slint::platform::key_codes::CloseCurlyBracket
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Tilde
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Colon
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Semicolon
Section titled “ Semicolon”constexpr std::u8string_view slint::platform::key_codes::Semicolon
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
LessThan
Section titled “ LessThan”constexpr std::u8string_view slint::platform::key_codes::LessThan
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Equals
Section titled “ Equals”constexpr std::u8string_view slint::platform::key_codes::Equals
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
GreaterThan
Section titled “ GreaterThan”constexpr std::u8string_view slint::platform::key_codes::GreaterThan
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
QuestionMark
Section titled “ QuestionMark”constexpr std::u8string_view slint::platform::key_codes::QuestionMark
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::At
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Comma
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
Period
Section titled “ Period”constexpr std::u8string_view slint::platform::key_codes::Period
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Slash
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
BackQuote
Section titled “ BackQuote”constexpr std::u8string_view slint::platform::key_codes::BackQuote
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
OpenBracket
Section titled “ OpenBracket”constexpr std::u8string_view slint::platform::key_codes::OpenBracket
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
BackSlash
Section titled “ BackSlash”constexpr std::u8string_view slint::platform::key_codes::BackSlash
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
CloseBracket
Section titled “ CloseBracket”constexpr std::u8string_view slint::platform::key_codes::CloseBracket
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
constexpr std::u8string_view slint::platform::key_codes::Quote
A constant that represents the key code to be used in slint::Window::dispatch_key_press_event().
© 2026 SixtyFPS GmbH