Antkeeper
0.0.1
|
Maps a keyboard key to a control input value. More...
#include <mapping.hpp>
Public Member Functions | |
constexpr mapping_type | get_mapping_type () const noexcept override |
Returns mapping_type::key. More... | |
key_mapping (input::keyboard *keyboard, input::scancode scancode, std::uint16_t modifiers=0, bool repeat=false) | |
Constructs a key mapping. More... | |
key_mapping ()=default | |
Constructs a key mapping. More... | |
![]() | |
mapping ()=default | |
Constructs an input mapping. More... | |
virtual | ~mapping ()=default |
Destructs an input mapping. More... | |
Public Attributes | |
input::keyboard * | keyboard {nullptr} |
Pointer to the mapped keyboard, or nullptr if input from any keyboard is accepted. More... | |
scancode | scancode {0} |
Scancode of the mapped key. More... | |
std::uint16_t | modifiers {0} |
Modifier keys bitbask. More... | |
bool | repeat {false} |
false if the mapping ignores key repeats, true otherwise. More... | |
Maps a keyboard key to a control input value.
Definition at line 124 of file mapping.hpp.
input::key_mapping::key_mapping | ( | input::keyboard * | keyboard, |
input::scancode | scancode, | ||
std::uint16_t | modifiers = 0 , |
||
bool | repeat = false |
||
) |
Constructs a key mapping.
keyboard | Pointer to the keyboard to map, or nullptr if input from any keyboard will be mapped. |
scancode | Scancode of the key to map. |
repeat | false if the mapping should ignore key repeats, true otherwise. |
modifiers | Modifier keys bitmask. |
Definition at line 39 of file mapping.cpp.
|
default |
Constructs a key mapping.
keyboard | Pointer to the keyboard to map, or nullptr if input from any keyboard will be mapped. |
scancode | Scancode of the key to map. |
repeat | false if the mapping should ignore key repeats, true otherwise. |
modifiers | Modifier keys bitmask. |
|
inlineconstexproverridevirtualnoexcept |
input::keyboard* input::key_mapping::keyboard {nullptr} |
Pointer to the mapped keyboard, or nullptr
if input from any keyboard is accepted.
Definition at line 147 of file mapping.hpp.
std::uint16_t input::key_mapping::modifiers {0} |
Modifier keys bitbask.
Definition at line 153 of file mapping.hpp.
bool input::key_mapping::repeat {false} |
false
if the mapping ignores key repeats, true
otherwise.
Definition at line 156 of file mapping.hpp.
scancode input::key_mapping::scancode {0} |
Scancode of the mapped key.
Definition at line 150 of file mapping.hpp.