Merge pull request #527 from keyboardio/pull/272

Allow for constructor call based creation of instances of Key_
pull/528/head
Jesse Vincent 6 years ago committed by GitHub
commit 0863ed1231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,6 +42,16 @@ union Key {
};
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 {
return this->raw == rhs;
}

Loading…
Cancel
Save