From b445573b00362c9fed800f007b76a59c7ac283b6 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 25 Oct 2022 01:24:21 +0100 Subject: [PATCH 1/2] Remove range assumptions --- keyboards/moonlander/moonlander.c | 11 +++++++++-- keyboards/planck/ez/ez.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index 8bde17b79e7d..29d13af3eec6 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -316,8 +316,15 @@ led_config_t g_led_config = { { #ifdef AUDIO_ENABLE bool music_mask_kb(uint16_t keycode) { switch (keycode) { - case QK_LAYER_TAP ... QK_ONE_SHOT_LAYER_MAX: - case QK_LAYER_TAP_TOGGLE ... QK_LAYER_MOD_MAX: + case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: + case QK_TO ... QK_TO_MAX: + case QK_MOMENTARY ... QK_MOMENTARY_MAX: + case QK_DEF_LAYER ... QK_DEF_LAYER_MAX: + case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX: + case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX: + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: + case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX: case QK_MOD_TAP ... QK_MOD_TAP_MAX: case AU_ON ... MUV_DE: case QK_BOOT: diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c index 01157e106b8e..84eb725c9079 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/planck/ez/ez.c @@ -318,8 +318,15 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { #ifdef AUDIO_ENABLE bool music_mask_kb(uint16_t keycode) { switch (keycode) { - case QK_LAYER_TAP ... QK_ONE_SHOT_LAYER_MAX: - case QK_LAYER_TAP_TOGGLE ... QK_LAYER_MOD_MAX: + case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: + case QK_TO ... QK_TO_MAX: + case QK_MOMENTARY ... QK_MOMENTARY_MAX: + case QK_DEF_LAYER ... QK_DEF_LAYER_MAX: + case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX: + case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX: + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: + case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX: case QK_MOD_TAP ... QK_MOD_TAP_MAX: case AU_ON ... MUV_DE: case QK_BOOT: From 40eecc963dc1454729f9445b4a8a722b157d9184 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 25 Oct 2022 01:28:42 +0100 Subject: [PATCH 2/2] More --- quantum/process_keycode/process_autocorrect.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/quantum/process_keycode/process_autocorrect.c b/quantum/process_keycode/process_autocorrect.c index abae5e781164..f19ca4a90baa 100644 --- a/quantum/process_keycode/process_autocorrect.c +++ b/quantum/process_keycode/process_autocorrect.c @@ -73,8 +73,13 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord case KC_LSFT: case KC_RSFT: case KC_CAPS: - case QK_TO ... QK_ONE_SHOT_LAYER_MAX: - case QK_LAYER_TAP_TOGGLE ... QK_LAYER_MOD_MAX: + case QK_TO ... QK_TO_MAX: + case QK_MOMENTARY ... QK_MOMENTARY_MAX: + case QK_DEF_LAYER ... QK_DEF_LAYER_MAX: + case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX: + case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX: + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX: return false;