Skip to content

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);
C++
constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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()

constexpr constexpr std::u8string_view 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 constexpr std::u8string_view 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