Allow for constructor call based creation of instances of Key_

pull/527/head
Florian Fleissner 7 years ago committed by Gergely Nagy
parent 20786e7430
commit 6d3ed7d6e5

@ -42,6 +42,16 @@ union Key {
}; };
uint16_t raw; uint16_t raw;
Key() = default;
constexpr Key(uint8_t __keyCode, uint8_t __flags)
: keyCode(__keyCode), flags(__flags) {
}
constexpr Key(uint16_t __raw)
: raw(__raw) {
}
constexpr bool operator==(const uint16_t rhs) const { constexpr bool operator==(const uint16_t rhs) const {
return this->raw == rhs; return this->raw == rhs;
} }

Loading…
Cancel
Save