Add support for macro media/system keys
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user