|
Nebula
|
The modifier keys as a bitmask.
Typedefs | |
| using | Code = uint32_t |
Functions | |
| Util::String | ToString (Code mods) |
| The modifiers as the combo string writes them: the groups, in the order a combo is written in. | |
| Code | FromString (const Util::String &token) |
| read one combo token as a modifier. Returns NoModifier when the token is not a modifier | |
| Code | FromKey (Key::Code key) |
| The bit a key code has, or NoModifier when the key is not a modifier key. | |
| bool | IsModifier (Key::Code key) |
| Returns true when the key code is one of the modifier keys. | |
| Code | Logical (Code bit) |
| The group a bit belongs to. | |
| bool | Matches (Code required, Code held) |
| Return true when the held bits satisfy the requirement. | |
| IndexT | Count (Code required) |
| The number of groups a requirement has. | |
Variables | |
| constexpr Code | NoModifier = 0 |
| constexpr Code | LeftControlModifier = 1 << 0 |
| constexpr Code | RightControlModifier = 1 << 1 |
| constexpr Code | LeftShiftModifier = 1 << 2 |
| constexpr Code | RightShiftModifier = 1 << 3 |
| constexpr Code | LeftAltModifier = 1 << 4 |
| constexpr Code | RightAltModifier = 1 << 5 |
| constexpr Code | LeftSuperModifier = 1 << 6 |
| constexpr Code | RightSuperModifier = 1 << 7 |
| constexpr Code | ControlModifier = LeftControlModifier | RightControlModifier |
| constexpr Code | ShiftModifier = LeftShiftModifier | RightShiftModifier |
| constexpr Code | AltModifier = LeftAltModifier | RightAltModifier |
| constexpr Code | SuperModifier = LeftSuperModifier | RightSuperModifier |
| constexpr Code | GroupMasks [] = { ControlModifier, ShiftModifier, AltModifier, SuperModifier } |
| constexpr const char * | GroupNames [] = { "ctrl", "shift", "alt", "super" } |
| constexpr IndexT | NumGroups = 4 |
| constexpr Key::Code | Keys [] |
| constexpr IndexT | NumKeys = 11 |
| using Input::Modifier::Code = uint32_t |
The bit a key code has, or NoModifier when the key is not a modifier key.
| Code Input::Modifier::FromString | ( | const Util::String & | token | ) |
read one combo token as a modifier. Returns NoModifier when the token is not a modifier
|
inline |
Returns true when the key code is one of the modifier keys.
The group a bit belongs to.
A group bit answers with itself.
Return true when the held bits satisfy the requirement.
| Util::String Input::Modifier::ToString | ( | Code | mods | ) |
The modifiers as the combo string writes them: the groups, in the order a combo is written in.
convert the modifiers to the combo string, as the groups in the order a combo is written in
A single side is written as its group, which is what the file can read back.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |