nxt::input::KeyEvent struct

One decoded keyboard input event.

Public functions

auto is_ctrl_c() const →  bool noexcept
True when the event is plain Ctrl-C.
auto is_text() const →  bool noexcept
True when the event should be treated as ordinary text insertion.

Public variables

Key key
Logical key identity.
EventType type
Press/repeat/release phase.
Modifiers mods
Active modifier set.
std::uint32_t codepoint
Unicode codepoint for character keys, or 0 when absent.
std::optional<std::uint32_t> shifted_codepoint
Shifted Unicode codepoint from keyboard protocol metadata.
std::optional<std::uint32_t> base_layout_codepoint
Base-layout Unicode codepoint from keyboard protocol metadata.
std::string text
Text to insert for plain text events.
std::string raw
Raw bytes consumed to produce this event.