1
0
Fork 0

Tidy up use of keycode range helpers (#19756)

This commit is contained in:
Joel Challis 2023-02-10 21:10:14 +00:00 committed by GitHub
parent 2ffdec5dc2
commit 1d0b4c8d38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 39 additions and 33 deletions

View file

@ -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);