GGUI::InputEvent struct

One input, in document space (UI units, origin top left).

Public static variables

static size_t TextBytes constexpr
Text, Compose, Paste: UTF-8, split across events when longer than TextBytes. bMore means more follows; the document reassembles before anything sees the text.

Public variables

InputKind Kind
what it is
uint8_t Button
PointerButton, for PointerDown and PointerUp.
uint8_t Clicks
1 = single, 2 = double, as counted by the platform
uint16_t Mods
modifiers held, as reported by the platform
float X
pointer position
float Y
pointer position
float WheelX
Wheel: notches.
float WheelY
Wheel: notches.
UIKey Key
uint16_t Code
KeyDown, KeyUp: the physical key as a GGKey (USB HID usage). With Mods it forms the chord commands match against. 0 = unknown; no chord.
bool bRepeat
KeyDown: auto-repeat.
bool bGamepad
KeyDown, KeyUp: from a gamepad.
GGPad Pad
and which of its buttons
GGPadFamily Family
and how it labels them
char Text
this piece of the text
uint8_t TextLength
bytes of Text used
bool bMore
more of the text follows in the next event
int16_t TextCursor
Compose: caret position in characters within the whole text.

Variable documentation

UIKey GGUI::InputEvent::Key

KeyDown, KeyUp