diff --git a/frontend/src/ts/elements/keymap.ts b/frontend/src/ts/elements/keymap.ts index d288b3dc7..49988d83c 100644 --- a/frontend/src/ts/elements/keymap.ts +++ b/frontend/src/ts/elements/keymap.ts @@ -161,6 +161,8 @@ export async function refresh( throw new Error("Failed to refresh keymap: layout not found"); } + const isISO = lts.type === "iso"; + let keymapElement = ""; // ( as (keyof MonkeyTypes.Keys)[]).forEach( @@ -187,7 +189,7 @@ export async function refresh( rowElement += "
"; } - if (row === "row4" && lts.type !== "iso" && !isMatrix && !isSteno) { + if (row === "row4" && !isISO && !isMatrix && !isSteno) { rowElement += ""; } @@ -217,11 +219,15 @@ export async function refresh( } else { for (let i = 0; i < rowKeys.length; i++) { if (row === "row2" && i === 12) continue; + if (row === "row4" && isMatrix && isISO && i === 0) continue; let colLimit = 10; if (lts.matrixShowRightColumn) { colLimit = 11; } + if (row === "row4" && isMatrix && isISO) { + colLimit += 1; + } if ( (Config.keymapStyle === "matrix" || @@ -270,7 +276,7 @@ export async function refresh( row === "row4" && (Config.keymapStyle === "split" || Config.keymapStyle === "alice") && - lts.type === "iso" + isISO ) { if (i === 6) { splitSpacer += ``; @@ -282,6 +288,10 @@ export async function refresh( if (i === 7) { splitSpacer += ``; } + } else if (row === "row4" && isMatrix && isISO) { + if (i === 6) { + splitSpacer += ``; + } } else { if (i === 5) { splitSpacer += ``; @@ -290,10 +300,7 @@ export async function refresh( } if (Config.keymapStyle === "alice" && row === "row4") { - if ( - (lts.type === "iso" && i === 6) || - (lts.type !== "iso" && i === 5) - ) { + if ((isISO && i === 6) || (!isISO && i === 5)) { splitSpacer += `