Class that abstracts a key, made up of the scan code and the modifier bits.
More...
#include <key.h>
|
enum | Scancode : uint8_t |
| The keys' scan codes (code 1)
|
|
|
| Key () |
| Default constructor: Instantiates an invalid key by setting ASCII, scan code, and modifier bits to 0.
|
|
bool | valid () const |
| Invalid keys have a scancode = 0.
|
|
void | invalidate () |
| Marks the key as invalid by setting the scan code to 0.
|
|
unsigned char | ascii () const |
| Get the key's ASCII value.
|
|
bool | alt () const |
| Indicates whether the ALT modifier is set.
|
|
bool | ctrl () const |
| Indicates whether the CTRL modifier is set.
|
|
Class that abstracts a key, made up of the scan code and the modifier bits.
◆ alt()
Indicates whether the ALT modifier is set.
- Returns
true
if ALT key was pressed during key press
◆ ascii()
unsigned char Key::ascii |
( |
| ) |
const |
Get the key's ASCII value.
- Returns
- the key's ASCII value
◆ ctrl()
Indicates whether the CTRL modifier is set.
- Returns
true
if CTRL key was pressed during key press
◆ valid()
bool Key::valid |
( |
| ) |
const |
|
inline |
Invalid keys have a scancode = 0.
- Returns
- Checks whether a key is valid.
The documentation for this struct was generated from the following files:
- object/key.h
- object/key.cc