|
Toast Engine
|


Go to the source code of this file.
Classes | |
| struct | input::KeyCode |
| A parsed keycode resolved to a device, kind and numeric code. More... | |
Enumerations | |
| enum class | input::Device : uint8_t { none , keyboard , mouse , controller } |
| Physical device a keycode belongs to. | |
| enum class | input::ModifierKey : uint8_t { none = 0 , shift = 0b001 , control = 0b010 , alt = 0b100 } |
| Bit flags for the keyboard modifier keys held during an input. | |
| enum class | input::InputKind : uint8_t { button , axis1d , axis2d , scroll , cursor } |
| Dimensionality of an input, used by the input system to pick a sampling path. More... | |
Functions | |
| constexpr auto | input::operator| (ModifierKey a, ModifierKey b) -> ModifierKey |
| constexpr auto | input::operator& (ModifierKey a, ModifierKey b) -> ModifierKey |
| auto | input::parseKeycode (std::string_view str) -> KeyCode |
| Parses a textual keycode such as "keyboard/a", "mouse/left" or "controller/left_stick". | |
Variables | |
| constexpr int | input::controller_stick_left = 0 |
| Controller stick indices used as the code for InputKind::axis2d controller inputs. | |
| constexpr int | input::controller_stick_right = 1 |
| constexpr int | input::controller_touchpad = 2 |
| constexpr int | input::controller_gyro_x = 100 |
| Gyro axis codes used as the code for the controller gyro_x/y/z inputs. | |
| constexpr int | input::controller_gyro_y = 101 |
| constexpr int | input::controller_gyro_z = 102 |
|
strong |
Dimensionality of an input, used by the input system to pick a sampling path.
|
nodiscard |
Parses a textual keycode such as "keyboard/a", "mouse/left" or "controller/left_stick".
| str | The keycode string; the device prefix selects the parsing path |