Add support for macro media/system keys
This commit is contained in:
parent
25aec56c08
commit
6aaa6e0ef9
7 changed files with 88 additions and 84 deletions
|
@ -373,6 +373,12 @@ void register_code(uint8_t code)
|
|||
host_add_mods(MOD_BIT(code));
|
||||
host_send_keyboard_report();
|
||||
}
|
||||
else if IS_SYSTEM(code) {
|
||||
host_system_send(KEYCODE2SYSTEM(code));
|
||||
}
|
||||
else if IS_CONSUMER(code) {
|
||||
host_consumer_send(KEYCODE2CONSUMER(code));
|
||||
}
|
||||
}
|
||||
|
||||
void unregister_code(uint8_t code)
|
||||
|
@ -400,6 +406,12 @@ void unregister_code(uint8_t code)
|
|||
host_del_mods(MOD_BIT(code));
|
||||
host_send_keyboard_report();
|
||||
}
|
||||
else if IS_SYSTEM(code) {
|
||||
host_system_send(0);
|
||||
}
|
||||
else if IS_CONSUMER(code) {
|
||||
host_consumer_send(0);
|
||||
}
|
||||
}
|
||||
|
||||
void add_mods(uint8_t mods)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue