libevdevxx 0.4.0
A C++ wrapper for libevdev.
|
Type-safe class for evdev codes (KEY_*
, BTN_*
, REL_*
, etc).
More...
#include <Code.hpp>
Public Types | |
using | Base = detail::NumberBase< std::uint16_t, Code > |
using | value_type = typename Base::Value |
The underlying value, same as std::uint16_t . | |
Public Member Functions | |
Code (Type type, value_type code_num) | |
Static Public Member Functions | |
static std::pair< Type, Code > | parse (std::string_view name, std::size_t *pos=nullptr) |
Parse a Type and Code from a string. | |
static Code | max (Type type) |
Returns the maximum code available for a given type. | |
Type-safe class for evdev codes (KEY_*
, BTN_*
, REL_*
, etc).
A Code
object can only be explicitly constructed from an integer. Conversion back to the integer value is implicit.
using value_type = typename Base::Value |
The underlying value, same as std::uint16_t
.
Code | ( | Type | type, |
value_type | code_num | ||
) |