From b31426252ed379937132ed7d2baf84a677123b5b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 1 Nov 2023 02:11:42 +0000 Subject: Generate switch statement helpers for keycode ranges (#20059) --- quantum/keymap_common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'quantum/keymap_common.c') diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 9a67fad278..91e47a72ee 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -59,19 +59,19 @@ action_t action_for_keycode(uint16_t keycode) { (void)mod; switch (keycode) { - case KC_A ... KC_EXSEL: - case KC_LEFT_CTRL ... KC_RIGHT_GUI: + case BASIC_KEYCODE_RANGE: + case MODIFIER_KEYCODE_RANGE: action.code = ACTION_KEY(keycode); break; #ifdef EXTRAKEY_ENABLE - case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE: + case SYSTEM_KEYCODE_RANGE: action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode)); break; - case KC_AUDIO_MUTE ... KC_LAUNCHPAD: + case CONSUMER_KEYCODE_RANGE: action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode)); break; #endif - case KC_MS_UP ... KC_MS_ACCEL2: + case MOUSE_KEYCODE_RANGE: action.code = ACTION_MOUSEKEY(keycode); break; case KC_TRANSPARENT: -- cgit v1.2.3