KeyEvent
KeyEvent
Section titled “KeyEvent”#include <Event.hpp>A keyboard key press event.
Key codes match standard ASCII where applicable. Special keys use values from [vextr::utils::Key](/api/utils/key#key).
Example:
if (auto* k = std::get_if<KeyEvent>(&e)) { if (k->key == 'q' && !k->modifiers.ctrl) app->quit();}Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
int | key | Key code (ASCII or utils::Key value) |
KeyModifiers | modifiers | Modifier keys held during the press. |
int keyKey code (ASCII or utils::Key value)
modifiers
Section titled “modifiers”KeyModifiers modifiersModifier keys held during the press.