summaryrefslogtreecommitdiff
path: root/quantum/keymap_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r--quantum/keymap_common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index f34ba26e5a..570d4798de 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -51,17 +51,23 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
action_t action = {};
uint8_t action_layer, when, mod;
+ (void)action_layer;
+ (void)when;
+ (void)mod;
+
switch (keycode) {
case KC_A ... KC_EXSEL:
case KC_LCTRL ... KC_RGUI:
action.code = ACTION_KEY(keycode);
break;
+#ifdef EXTRAKEY_ENABLE
case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE:
action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode));
break;
case KC_AUDIO_MUTE ... KC_BRIGHTNESS_DOWN:
action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode));
break;
+#endif
#ifdef MOUSEKEY_ENABLE
case KC_MS_UP ... KC_MS_ACCEL2:
action.code = ACTION_MOUSEKEY(keycode);
@@ -93,6 +99,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
action.code = ACTION_MACRO(keycode & 0xFF);
break;
#endif
+#ifndef NO_ACTION_LAYER
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
break;
@@ -117,6 +124,8 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
action_layer = keycode & 0xFF;
action.code = ACTION_LAYER_TOGGLE(action_layer);
break;
+#endif
+#ifndef NO_ACTION_ONESHOT
case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX:;
// OSL(action_layer) - One-shot action_layer
action_layer = keycode & 0xFF;
@@ -127,6 +136,8 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
mod = mod_config(keycode & 0xFF);
action.code = ACTION_MODS_ONESHOT(mod);
break;
+#endif
+#ifndef NO_ACTION_LAYER
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF);
break;
@@ -135,10 +146,13 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
action_layer = (keycode >> 4) & 0xF;
action.code = ACTION_LAYER_MODS(action_layer, mod);
break;
+#endif
+#ifndef NO_ACTION_TAPPING
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
mod = mod_config((keycode >> 0x8) & 0x1F);
action.code = ACTION_MODS_TAP_KEY(mod, keycode & 0xFF);
break;
+#endif
#ifdef SWAP_HANDS_ENABLE
case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
action.code = ACTION(ACT_SWAP_HANDS, keycode & 0xff);