forked from kofal.net/zmk
refactor(modifiers): define is_mods function
This commit is contained in:
committed by
Pete Johanson
parent
df4a5c8613
commit
0c30b49063
@@ -18,4 +18,9 @@ struct zmk_key_event {
|
||||
uint32_t row;
|
||||
zmk_key_t key;
|
||||
bool pressed;
|
||||
};
|
||||
};
|
||||
|
||||
static inline bool is_mod(uint8_t usage_page, uint32_t keycode) {
|
||||
return (keycode >= HID_USAGE_KEY_KEYBOARD_LEFTCONTROL &&
|
||||
keycode <= HID_USAGE_KEY_KEYBOARD_RIGHT_GUI && usage_page == HID_USAGE_KEY);
|
||||
}
|
||||
Reference in New Issue
Block a user