diff options
author | Joel Challis <[email protected]> | 2022-08-14 12:25:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-14 21:25:46 +1000 |
commit | ba04ecfabd4f254bb89ccd7d1de9ac7fb228ce5b (patch) | |
tree | 4198d6b70f683529a19d699a79dcd082e0b71cd2 /quantum/keymap_common.c | |
parent | ac31e429741a640b0d03d2ebd76554b7fe9247e0 (diff) | |
download | qmk_firmware-ba04ecfabd4f254bb89ccd7d1de9ac7fb228ce5b.tar.gz qmk_firmware-ba04ecfabd4f254bb89ccd7d1de9ac7fb228ce5b.zip |
Align TO() max layers with other keycodes (#17989)
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r-- | quantum/keymap_common.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index c1940f0fd3..8d7a8bda9a 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -47,10 +47,9 @@ action_t action_for_keycode(uint16_t keycode) { keycode = keycode_config(keycode); action_t action = {}; - uint8_t action_layer, when, mod; + uint8_t action_layer, mod; (void)action_layer; - (void)when; (void)mod; switch (keycode) { @@ -85,9 +84,8 @@ action_t action_for_keycode(uint16_t keycode) { break; case QK_TO ... QK_TO_MAX:; // Layer set "GOTO" - when = (keycode >> 0x4) & 0x3; - action_layer = keycode & 0xF; - action.code = ACTION_LAYER_SET(action_layer, when); + action_layer = keycode & 0xFF; + action.code = ACTION_LAYER_GOTO(action_layer); break; case QK_MOMENTARY ... QK_MOMENTARY_MAX:; // Momentary action_layer |