8#ifndef LIBEVDEVXX_CODE_HPP
9#define LIBEVDEVXX_CODE_HPP
38 using BaseType::BaseType;
56 std::size_t* pos =
nullptr);
Definition NumberBase.hpp:21
std::uint16_t Value
Definition NumberBase.hpp:25
The namespace of libevdevxx.
Definition AbsInfo.hpp:18
std::string code_to_string(Type type, Code code)
Converts the code to a string representation.
Type-safe class for evdev codes (KEY_*, BTN_*, REL_*, etc).
Definition Code.hpp:30
typename BaseType::Value value_type
The underlying value, same as std::uint16_t.
Definition Code.hpp:35
static std::pair< Type, Code > parse(std::string_view name, std::size_t *pos=nullptr)
Parse a Type and Code from a string.
detail::NumberBase< std::uint16_t, Code > BaseType
Definition Code.hpp:32
Code(Type type, value_type code_num)
static Code max(Type type)
Returns the maximum code available for a given type.