Skip to content

Commit

Permalink
keycodes: also take care of the different mask for LM
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzz committed Jun 4, 2024
1 parent a76a79d commit a9897af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/python/any_keycode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) << r("QMK_LM_SHIFT")) | ((mod)&0xF))
def LM(layer, mod): return (r("QK_LAYER_MOD") | (((layer)&0xF) << r("QMK_LM_SHIFT")) | ((mod)&r("QMK_LM_MASK")))
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))
Expand Down
1 change: 1 addition & 0 deletions src/main/python/keycodes/keycodes_v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ class keycodes_v5:
"QK_MACRO": 0x5F12,

"QMK_LM_SHIFT": 4,
"QMK_LM_MASK": 0xF,
}

masked = set()
Expand Down
1 change: 1 addition & 0 deletions src/main/python/keycodes/keycodes_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ class keycodes_v6:
"QK_KB": 0x7E00,

"QMK_LM_SHIFT": 5,
"QMK_LM_MASK": 0x1F,
}

masked = set()
Expand Down

0 comments on commit a9897af

Please sign in to comment.