mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-24 23:07:25 +08:00
impr(keymap): remove iso key when using matrix keymap on iso layouts
closes #5495
This commit is contained in:
parent
252b44653f
commit
050ba42f1a
1 changed files with 13 additions and 6 deletions
|
|
@ -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 += "<div></div>";
|
||||
}
|
||||
|
||||
if (row === "row4" && lts.type !== "iso" && !isMatrix && !isSteno) {
|
||||
if (row === "row4" && !isISO && !isMatrix && !isSteno) {
|
||||
rowElement += "<div></div>";
|
||||
}
|
||||
|
||||
|
|
@ -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 += `<div class="keymapSplitSpacer"></div>`;
|
||||
|
|
@ -282,6 +288,10 @@ export async function refresh(
|
|||
if (i === 7) {
|
||||
splitSpacer += `<div class="keymapSplitSpacer"></div>`;
|
||||
}
|
||||
} else if (row === "row4" && isMatrix && isISO) {
|
||||
if (i === 6) {
|
||||
splitSpacer += `<div class="keymapSplitSpacer"></div>`;
|
||||
}
|
||||
} else {
|
||||
if (i === 5) {
|
||||
splitSpacer += `<div class="keymapSplitSpacer"></div>`;
|
||||
|
|
@ -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 += `<div class="extraKey"><span class="letter"></span></div>`;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue