From 3a45a60b6b0d54e704a0be75f1d3b4a40dce6a21 Mon Sep 17 00:00:00 2001 From: Gary Ng Date: Sat, 31 Oct 2026 20:29:51 +0000 Subject: [PATCH] fix(launcher): keep every modifier in multi-modifier mod-taps A mod-tap set from Launcher or VIA with several modifiers, such as MT(MOD_MEH, KC_CAPS), held only the lowest one. MEH sent Ctrl alone. mod_to_zmk_keycode() returned the keycode of the first modifier bit it found and dropped the rest. Its uint8_t return type could not carry modifier flags either. Return the first modifier's keycode with the remaining modifiers in the top byte, the same encoding as LC(LS(LALT)). ZMK treats those as explicit modifiers when the keycode is itself a modifier, so all of them are held. Tested on a B6 Pro ANSI (PID 0x076B, keychron_b6_usn). Co-Authored-By: Claude Opus 5.5 --- app/src/launcher/map_keycode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/launcher/map_keycode.c b/app/src/launcher/map_keycode.c index 9d8d8c92bfd..ec5ce95506c 100644 --- a/app/src/launcher/map_keycode.c +++ b/app/src/launcher/map_keycode.c @@ -176,14 +176,14 @@ uint8_t mod_to_zmk(uint8_t mod) return mod ; } } -uint8_t mod_to_zmk_keycode(uint8_t mod_5bits) +uint32_t mod_to_zmk_keycode(uint8_t mod_5bits) { uint8_t mod=mod_to_zmk(mod_5bits); for(int i=0;i<8;i++) { if(mod &(1<