Tidy up use of keycode range helpers (#19756)
This commit is contained in:
parent
2ffdec5dc2
commit
1d0b4c8d38
16 changed files with 39 additions and 33 deletions
|
@ -76,7 +76,7 @@ void do_code16(uint16_t code, void (*f)(uint8_t)) {
|
|||
}
|
||||
|
||||
__attribute__((weak)) void register_code16(uint16_t code) {
|
||||
if (IS_MOD(code) || code == KC_NO) {
|
||||
if (IS_MODIFIER_KEYCODE(code) || code == KC_NO) {
|
||||
do_code16(code, register_mods);
|
||||
} else {
|
||||
do_code16(code, register_weak_mods);
|
||||
|
@ -86,7 +86,7 @@ __attribute__((weak)) void register_code16(uint16_t code) {
|
|||
|
||||
__attribute__((weak)) void unregister_code16(uint16_t code) {
|
||||
unregister_code(code);
|
||||
if (IS_MOD(code) || code == KC_NO) {
|
||||
if (IS_MODIFIER_KEYCODE(code) || code == KC_NO) {
|
||||
do_code16(code, unregister_mods);
|
||||
} else {
|
||||
do_code16(code, unregister_weak_mods);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue