From a76a79dfc3b2a82e9fe9ca44100005650097a469 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Mon, 3 Jun 2024 20:34:26 -0600 Subject: [PATCH] keycodes: fix LM() --- src/main/python/any_keycode.py | 2 +- src/main/python/keycodes/keycodes_v5.py | 2 ++ src/main/python/keycodes/keycodes_v6.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/python/any_keycode.py b/src/main/python/any_keycode.py index a6bb5c546b..48a7e4ac3b 100644 --- a/src/main/python/any_keycode.py +++ b/src/main/python/any_keycode.py @@ -36,7 +36,7 @@ def MO(layer): return (r("QK_MOMENTARY") | ((layer)&0xFF)) def DF(layer): return (r("QK_DEF_LAYER") | ((layer)&0xFF)) def TG(layer): return (r("QK_TOGGLE_LAYER") | ((layer)&0xFF)) def OSL(layer): return (r("QK_ONE_SHOT_LAYER") | ((layer)&0xFF)) -def LM(layer, mod): return (r("QK_LAYER_MOD") | (((layer)&0xF) << 4) | ((mod)&0xF)) +def LM(layer, mod): return (r("QK_LAYER_MOD") | (((layer)&0xF) << r("QMK_LM_SHIFT")) | ((mod)&0xF)) def OSM(mod): return (r("QK_ONE_SHOT_MOD") | ((mod)&0xFF)) def TT(layer): return (r("QK_LAYER_TAP_TOGGLE") | ((layer)&0xFF)) def MT(mod, kc): return (r("QK_MOD_TAP") | (((mod)&0x1F) << 8) | ((kc)&0xFF)) diff --git a/src/main/python/keycodes/keycodes_v5.py b/src/main/python/keycodes/keycodes_v5.py index 852afd8728..0b80146558 100644 --- a/src/main/python/keycodes/keycodes_v5.py +++ b/src/main/python/keycodes/keycodes_v5.py @@ -555,6 +555,8 @@ class keycodes_v5: "QK_KB": 0x5F80, "QK_MACRO": 0x5F12, + + "QMK_LM_SHIFT": 4, } masked = set() diff --git a/src/main/python/keycodes/keycodes_v6.py b/src/main/python/keycodes/keycodes_v6.py index 1373c543f6..f4d56ec640 100644 --- a/src/main/python/keycodes/keycodes_v6.py +++ b/src/main/python/keycodes/keycodes_v6.py @@ -555,6 +555,8 @@ class keycodes_v6: "FN_MO23": 0x7C78, "QK_KB": 0x7E00, + + "QMK_LM_SHIFT": 5, } masked = set()