1.2
Public Member Functions | Public Attributes | List of all members
Key Struct Reference

Keyboard event data. More...

Public Member Functions

constexpr Key () noexcept=default
 
constexpr Key (KeyboardCode k, uint32_t u=0) noexcept
 

Public Attributes

KeyboardCode keycode {EKEY_UNKNOWN}
 Key code value. More...
 
uint32_t unicode {0}
 32 bit unicode code point. More...
 

Detailed Description

Keyboard event data.

Constructor & Destructor Documentation

◆ Key() [1/2]

constexpr Key ( )
constexprdefaultnoexcept

◆ Key() [2/2]

constexpr Key ( KeyboardCode  k,
uint32_t  u = 0 
)
inlineexplicitconstexprnoexcept
Parameters
[in]kKey code for the event.
[in]uUnicode value of the event.

Member Data Documentation

◆ keycode

Key code value.

This is basically the physical key that was pressed.

Any idea of a scancode or keysym is handled by the input backends themselves, which truly represent physical keys and are used for mappings.

See also
KeyboardCode

◆ unicode

uint32_t unicode {0}

32 bit unicode code point.