Tidy up use of keycode range helpers (#19756)
This commit is contained in:
@@ -189,7 +189,7 @@ extern "C" {
|
||||
bool matrix_is_on(uint8_t row, uint8_t col) {
|
||||
uint8_t code = CODE(row, col);
|
||||
|
||||
if (IS_MOD(code)) {
|
||||
if (IS_MODIFIER_KEYCODE(code)) {
|
||||
if (local_keyboard_report.mods & ROW_BITS(code)) {
|
||||
return true;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ extern "C" {
|
||||
matrix_row_t matrix_get_row(uint8_t row) {
|
||||
uint16_t row_bits = 0;
|
||||
|
||||
if (IS_MOD(CODE(row, 0)) && local_keyboard_report.mods) {
|
||||
if (IS_MODIFIER_KEYCODE(CODE(row, 0)) && local_keyboard_report.mods) {
|
||||
row_bits |= local_keyboard_report.mods;
|
||||
}
|
||||
|
||||
|
@@ -47,7 +47,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!IS_MOD(keycode) && record->event.pressed) {
|
||||
if (!IS_MODIFIER_KEYCODE(keycode) && record->event.pressed) {
|
||||
if(keycode == KC_E || keycode == KC_A || keycode == KC_O || keycode == KC_I || keycode == KC_U) {
|
||||
predecessor_key = KC_O;
|
||||
vowel_proximity = timer_read();
|
||||
|
@@ -175,7 +175,7 @@ extern "C"
|
||||
bool matrix_is_on(uint8_t row, uint8_t col) {
|
||||
uint8_t code = CODE(row, col);
|
||||
|
||||
if (IS_MOD(code)) {
|
||||
if (IS_MODIFIER_KEYCODE(code)) {
|
||||
if (local_keyboard_report.mods & ROW_BITS(code)) {
|
||||
return true;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ extern "C"
|
||||
matrix_row_t matrix_get_row(uint8_t row) {
|
||||
uint16_t row_bits = 0;
|
||||
|
||||
if (IS_MOD(CODE(row, 0)) && local_keyboard_report.mods) {
|
||||
if (IS_MODIFIER_KEYCODE(CODE(row, 0)) && local_keyboard_report.mods) {
|
||||
row_bits |= local_keyboard_report.mods;
|
||||
}
|
||||
|
||||
|
@@ -45,7 +45,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
backlight_level(6);
|
||||
}
|
||||
|
||||
if (IS_MOD(keycode)) {
|
||||
if (IS_MODIFIER_KEYCODE(keycode)) {
|
||||
if (record->event.pressed) {
|
||||
rgblight_setrgb(RGB_RED);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user