Commit 1f2c2ea9bea0

Vincent Demeester <vincent@sbr.pm>
2025-11-22 22:09:00
keyboards: revert to hardcoded combos for moonlander in generate-keymap.sh
I will ask claude to update it (or will do it manually). Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 1d0e14f
Changed files (3)
keyboards/moonlander/parse-combos.sh
@@ -1,111 +0,0 @@
-#!/usr/bin/env bash
-# Parse combo definitions from keymap.c and generate YAML format for keymap-drawer
-#
-# This script maps QMK keycodes to their visual positions in the keymap-drawer output.
-# The positions are derived from the QWERTY layer layout in keymap.c.
-#
-# HOW POSITIONS WERE DETERMINED:
-# 1. Convert QMK keymap to JSON (from QMK firmware directory):
-#    $ qmk c2json --no-cpp -kb zsa/moonlander -km vincent > moonlander.json
-#
-# 2. Parse JSON to YAML with keymap-drawer (14 columns for Moonlander):
-#    $ keymap parse -c 14 -q moonlander.json > moonlander.yaml
-#
-# 3. The resulting YAML contains the layout array where each key has a sequential
-#    index (0-71 in row-major order). Match keycodes to their positions by looking
-#    at the QWERTY layer (L2) array in the JSON output.
-#
-# 4. For combo definitions in keymap.c, the key positions in combo arrays correspond
-#    to these visual indices. Example from keymap.c:
-#      const uint16_t qwer_combo[] = {KC_Q, KC_W, COMBO_END};
-#    Maps to positions [15, 16] where KC_Q=position 15, KC_W=position 16
-#
-# NOTE: Home row mod keys (HM_*) need special mapping since they differ between
-# layers (e.g., HM_GUI_A on QWERTY vs Bépo), but physical position stays the same.
-
-set -euo pipefail
-
-# Map of QMK keycodes to visual positions (based on QWERTY layer)
-# The Moonlander has 72 keys, indexed 0-71 in row-major order
-declare -A POS
-
-# Row 0 (top row) - all XXXXXXX
-for i in {0..13}; do POS[XXXXXXX_$i]=$i; done
-
-# Row 1
-POS[KC_TAB]=14
-POS[KC_Q]=15; POS[KC_W]=16; POS[KC_E]=17; POS[KC_R]=18; POS[KC_T]=19
-POS[KC_Y]=22; POS[KC_U]=23; POS[KC_I]=24; POS[KC_O]=25; POS[KC_P]=26; POS[KC_LBRC]=27
-
-# Row 2
-POS[NUMWORD]=28
-POS[HM_GUI_A]=29; POS[HM_ALT_S]=30; POS[HM_SFT_D]=31; POS[HM_CTL_F]=32; POS[HM_HYP_G]=33
-POS[HM_HYP_H]=36; POS[HM_CTL_J]=37; POS[HM_SFT_K]=38; POS[HM_ALT_L]=39; POS[HM_GUI_SCLN]=40; POS[KC_QUOT]=41
-
-# Row 3
-POS[KC_GRV]=42
-POS[KC_Z]=43; POS[KC_X]=44; POS[KC_C]=45; POS[KC_V]=46; POS[KC_B]=47
-POS[KC_N]=48; POS[KC_M]=49; POS[KC_COMM]=50; POS[KC_DOT]=51; POS[KC_SLSH]=52; POS[KC_RBRC]=53
-
-# Row 4 (bottom row before thumb cluster)
-for i in {54..57}; do POS[XXXXXXX_row4_$i]=$i; done
-POS[KC_DEL]=58
-POS[QK_REP]=59
-POS[QK_AREP]=60
-POS[KC_RALT]=61
-for i in {62..65}; do POS[XXXXXXX_row4_$i]=$i; done
-
-# Row 5 (thumb cluster)
-POS["LT(NUMB,KC_SPC)"]=66
-POS["LT(NAVI,KC_BSPC)"]=67
-POS["OS_LSFT"]=70
-POS["LT(SYMB,KC_ENT)"]=71
-
-# Also map for Bépo layer equivalents
-POS[HM_ALT_R]=39  # Bépo R is same position as QWERTY L
-POS[HM_GUI_N]=40  # Bépo N is same position as QWERTY SCLN
-
-get_pos() {
-    local key=$1
-    echo "${POS[$key]:-}"
-}
-
-echo "combos:"
-echo "  # Layer switching combos"
-echo "  - { p: [$(get_pos 'LT(NAVI,KC_BSPC)'), $(get_pos 'OS_LSFT')], k: \"→ Bépo\", l: [L1, L2], draw_separate: true }"
-echo "  - { p: [$(get_pos 'LT(NUMB,KC_SPC)'), $(get_pos 'LT(SYMB,KC_ENT)')], k: \"→ ErgoL\", l: [L0, L2], draw_separate: true }"
-echo "  - { p: [$(get_pos 'KC_DEL'), $(get_pos 'KC_RALT')], k: \"→ QWERTY\", l: [L0, L1], draw_separate: true }"
-echo "  - { p: [$(get_pos 'KC_Q'), $(get_pos 'KC_R')], k: \"⇄ Mouse\", draw_separate: true }"
-echo ""
-
-echo "  # Escape combos (layer-specific)"
-echo "  - { p: [$(get_pos 'HM_ALT_R'), $(get_pos 'HM_GUI_N')], k: ESC, l: [L0] }"
-echo "  - { p: [$(get_pos 'HM_ALT_L'), $(get_pos 'HM_GUI_SCLN')], k: ESC, l: [L2] }"
-echo ""
-
-echo "  # Special character combos (available on all layers)"
-echo "  - { p: [$(get_pos 'KC_Q'), $(get_pos 'KC_W')], k: \"|\" }"
-echo "  - { p: [$(get_pos 'KC_W'), $(get_pos 'KC_E')], k: \"@\" }"
-echo "  - { p: [$(get_pos 'KC_E'), $(get_pos 'KC_R')], k: \"#\" }"
-echo "  - { p: [$(get_pos 'KC_R'), $(get_pos 'KC_T')], k: \"&\" }"
-echo "  - { p: [$(get_pos 'KC_R'), $(get_pos 'HM_CTL_F')], k: \"\$\" }"
-echo "  - { p: [$(get_pos 'KC_E'), $(get_pos 'HM_SFT_D')], k: \"/\" }"
-printf '  - { p: [%s, %s], k: "\\\\" }\n' "$(get_pos 'HM_SFT_D')" "$(get_pos 'KC_C')"
-echo "  - { p: [$(get_pos 'KC_W'), $(get_pos 'HM_ALT_S')], k: \"-\" }"
-echo "  - { p: [$(get_pos 'HM_CTL_F'), $(get_pos 'KC_V')], k: \"_\" }"
-echo "  - { p: [$(get_pos 'HM_ALT_S'), $(get_pos 'KC_X')], k: \"=\" }"
-echo ""
-
-echo "  # Bracket combos (available on all layers)"
-echo "  - { p: [$(get_pos 'KC_I'), $(get_pos 'HM_SFT_K')], k: \"(\" }"
-echo "  - { p: [$(get_pos 'HM_SFT_K'), $(get_pos 'KC_COMM')], k: \")\" }"
-echo "  - { p: [$(get_pos 'KC_U'), $(get_pos 'HM_CTL_J')], k: \"{\" }"
-echo "  - { p: [$(get_pos 'HM_CTL_J'), $(get_pos 'KC_M')], k: \"}\" }"
-echo "  - { p: [$(get_pos 'KC_O'), $(get_pos 'HM_ALT_L')], k: \"[\" }"
-echo "  - { p: [$(get_pos 'HM_ALT_L'), $(get_pos 'KC_DOT')], k: \"]\" }"
-echo "  - { p: [$(get_pos 'KC_U'), $(get_pos 'KC_I')], k: \"<\" }"
-echo "  - { p: [$(get_pos 'KC_I'), $(get_pos 'KC_O')], k: \">\" }"
-echo ""
-
-echo "  # Leader key combo (available on all layers)"
-echo "  - { p: [$(get_pos 'HM_SFT_D'), $(get_pos 'HM_CTL_F')], k: LEADER }"
keyboards/generate-keymaps.sh
@@ -87,15 +87,45 @@ generate_moonlander() {
 	log_info "Parsing keymap to YAML..."
 	keymap -c "$config_yaml" parse -c 14 -q "$qmk_json" >"$keymap_yaml"
 
-	# Add combo definitions from keymap.c
-	log_info "Parsing combos from keymap.c..."
-	local parse_combos_script="$SCRIPT_DIR/moonlander/parse-combos.sh"
-	if [[ -x "$parse_combos_script" ]]; then
-		"$parse_combos_script" "$SCRIPT_DIR/moonlander/config/keymap.c" >>"$keymap_yaml"
-	else
-		log_warn "Combo parser not found or not executable: $parse_combos_script"
-		log_warn "Skipping combo generation"
-	fi
+	# Add manual combo definitions to the YAML
+	log_info "Adding manual combo definitions..."
+	cat >>"$keymap_yaml" <<'EOF'
+combos:
+  # Layer switching combos (L0=Bépo, L1=ErgoL, L2=QWERTY)
+  - { p: [67, 70], k: "→ Bépo", l: [L1, L2], draw_separate: true }
+  - { p: [66, 71], k: "→ ErgoL", l: [L0, L2], draw_separate: true }
+  - { p: [58, 61], k: "→ QWERTY", l: [L0, L1], draw_separate: true }
+  - { p: [17, 18], k: "⇄ Mouse", draw_separate: true }
+
+  # Escape combos (layer-specific)
+  - { p: [39, 40], k: ESC, l: [L0] }
+  - { p: [39, 40], k: ESC, l: [L2] }
+
+  # Special character combos (available on all layers)
+  - { p: [15, 16], k: "|" }
+  - { p: [16, 17], k: "@" }
+  - { p: [17, 18], k: "#" }
+  - { p: [18, 19], k: "&" }
+  - { p: [18, 32], k: "$" }
+  - { p: [17, 31], k: "/" }
+  - { p: [31, 45], k: "\\" }
+  - { p: [16, 30], k: "-" }
+  - { p: [32, 46], k: "_" }
+  - { p: [30, 44], k: "=" }
+
+  # Bracket combos (available on all layers)
+  - { p: [23, 38], k: "(" }
+  - { p: [38, 50], k: ")" }
+  - { p: [22, 37], k: "{" }
+  - { p: [37, 49], k: "}" }
+  - { p: [24, 39], k: "[" }
+  - { p: [39, 51], k: "]" }
+  - { p: [23, 24], k: "<" }
+  - { p: [24, 25], k: ">" }
+
+  # Leader key combo (available on all layers)
+  - { p: [31, 32], k: LEADER }
+EOF
 
 	# Draw SVG from YAML with combos
 	log_info "Drawing SVG with combos..."
keyboards/moonlander.svg
@@ -684,24 +684,24 @@ path.combo {
 <text x="140" y="175" class="combo tap">=</text>
 </g>
 <g class="combo combopos-11">
-<rect rx="6" ry="6" x="740" y="96" width="32" height="32" class="combo"/>
-<text x="756" y="112" class="combo tap">(</text>
+<rect rx="6" ry="6" x="712" y="100" width="32" height="32" class="combo"/>
+<text x="728" y="116" class="combo tap">(</text>
 </g>
 <g class="combo combopos-12">
 <rect rx="6" ry="6" x="740" y="152" width="32" height="32" class="combo"/>
 <text x="756" y="168" class="combo tap">)</text>
 </g>
 <g class="combo combopos-13">
-<rect rx="6" ry="6" x="684" y="103" width="32" height="32" class="combo"/>
-<text x="700" y="119" class="combo tap">{</text>
+<rect rx="6" ry="6" x="656" y="106" width="32" height="32" class="combo"/>
+<text x="672" y="122" class="combo tap">{</text>
 </g>
 <g class="combo combopos-14">
 <rect rx="6" ry="6" x="684" y="159" width="32" height="32" class="combo"/>
 <text x="700" y="175" class="combo tap">}</text>
 </g>
 <g class="combo combopos-15">
-<rect rx="6" ry="6" x="796" y="103" width="32" height="32" class="combo"/>
-<text x="812" y="119" class="combo tap">[</text>
+<rect rx="6" ry="6" x="768" y="100" width="32" height="32" class="combo"/>
+<text x="784" y="116" class="combo tap">[</text>
 </g>
 <g class="combo combopos-16">
 <rect rx="6" ry="6" x="796" y="159" width="32" height="32" class="combo"/>
@@ -1035,24 +1035,24 @@ path.combo {
 <text x="140" y="175" class="combo tap">=</text>
 </g>
 <g class="combo combopos-10">
-<rect rx="6" ry="6" x="740" y="96" width="32" height="32" class="combo"/>
-<text x="756" y="112" class="combo tap">(</text>
+<rect rx="6" ry="6" x="712" y="100" width="32" height="32" class="combo"/>
+<text x="728" y="116" class="combo tap">(</text>
 </g>
 <g class="combo combopos-11">
 <rect rx="6" ry="6" x="740" y="152" width="32" height="32" class="combo"/>
 <text x="756" y="168" class="combo tap">)</text>
 </g>
 <g class="combo combopos-12">
-<rect rx="6" ry="6" x="684" y="103" width="32" height="32" class="combo"/>
-<text x="700" y="119" class="combo tap">{</text>
+<rect rx="6" ry="6" x="656" y="106" width="32" height="32" class="combo"/>
+<text x="672" y="122" class="combo tap">{</text>
 </g>
 <g class="combo combopos-13">
 <rect rx="6" ry="6" x="684" y="159" width="32" height="32" class="combo"/>
 <text x="700" y="175" class="combo tap">}</text>
 </g>
 <g class="combo combopos-14">
-<rect rx="6" ry="6" x="796" y="103" width="32" height="32" class="combo"/>
-<text x="812" y="119" class="combo tap">[</text>
+<rect rx="6" ry="6" x="768" y="100" width="32" height="32" class="combo"/>
+<text x="784" y="116" class="combo tap">[</text>
 </g>
 <g class="combo combopos-15">
 <rect rx="6" ry="6" x="796" y="159" width="32" height="32" class="combo"/>
@@ -1390,24 +1390,24 @@ path.combo {
 <text x="140" y="175" class="combo tap">=</text>
 </g>
 <g class="combo combopos-11">
-<rect rx="6" ry="6" x="740" y="96" width="32" height="32" class="combo"/>
-<text x="756" y="112" class="combo tap">(</text>
+<rect rx="6" ry="6" x="712" y="100" width="32" height="32" class="combo"/>
+<text x="728" y="116" class="combo tap">(</text>
 </g>
 <g class="combo combopos-12">
 <rect rx="6" ry="6" x="740" y="152" width="32" height="32" class="combo"/>
 <text x="756" y="168" class="combo tap">)</text>
 </g>
 <g class="combo combopos-13">
-<rect rx="6" ry="6" x="684" y="103" width="32" height="32" class="combo"/>
-<text x="700" y="119" class="combo tap">{</text>
+<rect rx="6" ry="6" x="656" y="106" width="32" height="32" class="combo"/>
+<text x="672" y="122" class="combo tap">{</text>
 </g>
 <g class="combo combopos-14">
 <rect rx="6" ry="6" x="684" y="159" width="32" height="32" class="combo"/>
 <text x="700" y="175" class="combo tap">}</text>
 </g>
 <g class="combo combopos-15">
-<rect rx="6" ry="6" x="796" y="103" width="32" height="32" class="combo"/>
-<text x="812" y="119" class="combo tap">[</text>
+<rect rx="6" ry="6" x="768" y="100" width="32" height="32" class="combo"/>
+<text x="784" y="116" class="combo tap">[</text>
 </g>
 <g class="combo combopos-16">
 <rect rx="6" ry="6" x="796" y="159" width="32" height="32" class="combo"/>
@@ -1739,24 +1739,24 @@ path.combo {
 <text x="140" y="175" class="combo tap">=</text>
 </g>
 <g class="combo combopos-10">
-<rect rx="6" ry="6" x="740" y="96" width="32" height="32" class="combo"/>
-<text x="756" y="112" class="combo tap">(</text>
+<rect rx="6" ry="6" x="712" y="100" width="32" height="32" class="combo"/>
+<text x="728" y="116" class="combo tap">(</text>
 </g>
 <g class="combo combopos-11">
 <rect rx="6" ry="6" x="740" y="152" width="32" height="32" class="combo"/>
 <text x="756" y="168" class="combo tap">)</text>
 </g>
 <g class="combo combopos-12">
-<rect rx="6" ry="6" x="684" y="103" width="32" height="32" class="combo"/>
-<text x="700" y="119" class="combo tap">{</text>
+<rect rx="6" ry="6" x="656" y="106" width="32" height="32" class="combo"/>
+<text x="672" y="122" class="combo tap">{</text>
 </g>
 <g class="combo combopos-13">
 <rect rx="6" ry="6" x="684" y="159" width="32" height="32" class="combo"/>
 <text x="700" y="175" class="combo tap">}</text>
 </g>
 <g class="combo combopos-14">
-<rect rx="6" ry="6" x="796" y="103" width="32" height="32" class="combo"/>
-<text x="812" y="119" class="combo tap">[</text>
+<rect rx="6" ry="6" x="768" y="100" width="32" height="32" class="combo"/>
+<text x="784" y="116" class="combo tap">[</text>
 </g>
 <g class="combo combopos-15">
 <rect rx="6" ry="6" x="796" y="159" width="32" height="32" class="combo"/>
@@ -2097,24 +2097,24 @@ path.combo {
 <text x="140" y="175" class="combo tap">=</text>
 </g>
 <g class="combo combopos-10">
-<rect rx="6" ry="6" x="740" y="96" width="32" height="32" class="combo"/>
-<text x="756" y="112" class="combo tap">(</text>
+<rect rx="6" ry="6" x="712" y="100" width="32" height="32" class="combo"/>
+<text x="728" y="116" class="combo tap">(</text>
 </g>
 <g class="combo combopos-11">
 <rect rx="6" ry="6" x="740" y="152" width="32" height="32" class="combo"/>
 <text x="756" y="168" class="combo tap">)</text>
 </g>
 <g class="combo combopos-12">
-<rect rx="6" ry="6" x="684" y="103" width="32" height="32" class="combo"/>
-<text x="700" y="119" class="combo tap">{</text>
+<rect rx="6" ry="6" x="656" y="106" width="32" height="32" class="combo"/>
+<text x="672" y="122" class="combo tap">{</text>
 </g>
 <g class="combo combopos-13">
 <rect rx="6" ry="6" x="684" y="159" width="32" height="32" class="combo"/>
 <text x="700" y="175" class="combo tap">}</text>
 </g>
 <g class="combo combopos-14">
-<rect rx="6" ry="6" x="796" y="103" width="32" height="32" class="combo"/>
-<text x="812" y="119" class="combo tap">[</text>
+<rect rx="6" ry="6" x="768" y="100" width="32" height="32" class="combo"/>
+<text x="784" y="116" class="combo tap">[</text>
 </g>
 <g class="combo combopos-15">
 <rect rx="6" ry="6" x="796" y="159" width="32" height="32" class="combo"/>
@@ -2460,24 +2460,24 @@ path.combo {
 <text x="140" y="175" class="combo tap">=</text>
 </g>
 <g class="combo combopos-10">
-<rect rx="6" ry="6" x="740" y="96" width="32" height="32" class="combo"/>
-<text x="756" y="112" class="combo tap">(</text>
+<rect rx="6" ry="6" x="712" y="100" width="32" height="32" class="combo"/>
+<text x="728" y="116" class="combo tap">(</text>
 </g>
 <g class="combo combopos-11">
 <rect rx="6" ry="6" x="740" y="152" width="32" height="32" class="combo"/>
 <text x="756" y="168" class="combo tap">)</text>
 </g>
 <g class="combo combopos-12">
-<rect rx="6" ry="6" x="684" y="103" width="32" height="32" class="combo"/>
-<text x="700" y="119" class="combo tap">{</text>
+<rect rx="6" ry="6" x="656" y="106" width="32" height="32" class="combo"/>
+<text x="672" y="122" class="combo tap">{</text>
 </g>
 <g class="combo combopos-13">
 <rect rx="6" ry="6" x="684" y="159" width="32" height="32" class="combo"/>
 <text x="700" y="175" class="combo tap">}</text>
 </g>
 <g class="combo combopos-14">
-<rect rx="6" ry="6" x="796" y="103" width="32" height="32" class="combo"/>
-<text x="812" y="119" class="combo tap">[</text>
+<rect rx="6" ry="6" x="768" y="100" width="32" height="32" class="combo"/>
+<text x="784" y="116" class="combo tap">[</text>
 </g>
 <g class="combo combopos-15">
 <rect rx="6" ry="6" x="796" y="159" width="32" height="32" class="combo"/>
@@ -2818,24 +2818,24 @@ path.combo {
 <text x="140" y="175" class="combo tap">=</text>
 </g>
 <g class="combo combopos-10">
-<rect rx="6" ry="6" x="740" y="96" width="32" height="32" class="combo"/>
-<text x="756" y="112" class="combo tap">(</text>
+<rect rx="6" ry="6" x="712" y="100" width="32" height="32" class="combo"/>
+<text x="728" y="116" class="combo tap">(</text>
 </g>
 <g class="combo combopos-11">
 <rect rx="6" ry="6" x="740" y="152" width="32" height="32" class="combo"/>
 <text x="756" y="168" class="combo tap">)</text>
 </g>
 <g class="combo combopos-12">
-<rect rx="6" ry="6" x="684" y="103" width="32" height="32" class="combo"/>
-<text x="700" y="119" class="combo tap">{</text>
+<rect rx="6" ry="6" x="656" y="106" width="32" height="32" class="combo"/>
+<text x="672" y="122" class="combo tap">{</text>
 </g>
 <g class="combo combopos-13">
 <rect rx="6" ry="6" x="684" y="159" width="32" height="32" class="combo"/>
 <text x="700" y="175" class="combo tap">}</text>
 </g>
 <g class="combo combopos-14">
-<rect rx="6" ry="6" x="796" y="103" width="32" height="32" class="combo"/>
-<text x="812" y="119" class="combo tap">[</text>
+<rect rx="6" ry="6" x="768" y="100" width="32" height="32" class="combo"/>
+<text x="784" y="116" class="combo tap">[</text>
 </g>
 <g class="combo combopos-15">
 <rect rx="6" ry="6" x="796" y="159" width="32" height="32" class="combo"/>
@@ -3194,24 +3194,24 @@ path.combo {
 <text x="140" y="175" class="combo tap">=</text>
 </g>
 <g class="combo combopos-10">
-<rect rx="6" ry="6" x="740" y="96" width="32" height="32" class="combo"/>
-<text x="756" y="112" class="combo tap">(</text>
+<rect rx="6" ry="6" x="712" y="100" width="32" height="32" class="combo"/>
+<text x="728" y="116" class="combo tap">(</text>
 </g>
 <g class="combo combopos-11">
 <rect rx="6" ry="6" x="740" y="152" width="32" height="32" class="combo"/>
 <text x="756" y="168" class="combo tap">)</text>
 </g>
 <g class="combo combopos-12">
-<rect rx="6" ry="6" x="684" y="103" width="32" height="32" class="combo"/>
-<text x="700" y="119" class="combo tap">{</text>
+<rect rx="6" ry="6" x="656" y="106" width="32" height="32" class="combo"/>
+<text x="672" y="122" class="combo tap">{</text>
 </g>
 <g class="combo combopos-13">
 <rect rx="6" ry="6" x="684" y="159" width="32" height="32" class="combo"/>
 <text x="700" y="175" class="combo tap">}</text>
 </g>
 <g class="combo combopos-14">
-<rect rx="6" ry="6" x="796" y="103" width="32" height="32" class="combo"/>
-<text x="812" y="119" class="combo tap">[</text>
+<rect rx="6" ry="6" x="768" y="100" width="32" height="32" class="combo"/>
+<text x="784" y="116" class="combo tap">[</text>
 </g>
 <g class="combo combopos-15">
 <rect rx="6" ry="6" x="796" y="159" width="32" height="32" class="combo"/>
@@ -3963,14 +3963,14 @@ path.combo {
 <g transform="translate(14, 112)" class="key keypos-15">
 <rect rx="6" ry="6" x="-11" y="-11" width="22" height="22" class="key"/>
 </g>
-<g transform="translate(42, 112)" class="key held keypos-16">
-<rect rx="6" ry="6" x="-11" y="-11" width="22" height="22" class="key held"/>
+<g transform="translate(42, 112)" class="key keypos-16">
+<rect rx="6" ry="6" x="-11" y="-11" width="22" height="22" class="key"/>
 </g>
 <g transform="translate(70, 104)" class="key keypos-17">
 <rect rx="6" ry="6" x="-11" y="-11" width="22" height="22" class="key"/>
 </g>
-<g transform="translate(98, 101)" class="key keypos-18">
-<rect rx="6" ry="6" x="-11" y="-11" width="22" height="22" class="key"/>
+<g transform="translate(98, 101)" class="key held keypos-18">
+<rect rx="6" ry="6" x="-11" y="-11" width="22" height="22" class="key held"/>
 </g>
 <g transform="translate(126, 104)" class="key held keypos-19">
 <rect rx="6" ry="6" x="-11" y="-11" width="22" height="22" class="key held"/>