From a914c994c9a37574f9671619b722b25e7577ab9f Mon Sep 17 00:00:00 2001 From: Leonabcd123 <156839416+Leonabcd123@users.noreply.github.com> Date: Sun, 8 Mar 2026 20:24:27 +0200 Subject: [PATCH 1/4] Highlight key after layout switch in timed mode --- frontend/src/ts/test/test-timer.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/ts/test/test-timer.ts b/frontend/src/ts/test/test-timer.ts index b610f9ceb7b4..f166e9f76910 100644 --- a/frontend/src/ts/test/test-timer.ts +++ b/frontend/src/ts/test/test-timer.ts @@ -7,6 +7,7 @@ import * as TimerProgress from "./timer-progress"; import * as LiveSpeed from "./live-speed"; import * as TestStats from "./test-stats"; import * as TestInput from "./test-input"; +import * as TestWords from "./test-words"; import * as Monkey from "./monkey"; import * as Numbers from "@monkeytype/util/numbers"; import { @@ -18,6 +19,7 @@ import * as SlowTimer from "../states/slow-timer"; import * as TestState from "./test-state"; import * as Time from "../states/time"; import * as TimerEvent from "../observables/timer-event"; +import * as KeymapEvent from "../observables/keymap-event"; import * as LayoutfluidFunboxTimer from "../test/funbox/layoutfluid-funbox-timer"; import { KeymapLayout, Layout } from "@monkeytype/schemas/configs"; import * as SoundController from "../controllers/sound-controller"; @@ -135,6 +137,11 @@ function layoutfluid(): void { setConfig("keymapLayout", layout as KeymapLayout, { nosave: true, }); + setTimeout(() => { + void KeymapEvent.highlight( + TestWords.words.getCurrent().charAt(TestInput.input.current.length), + ); + }, 1); } } if (timerDebug) console.timeEnd("layoutfluid"); From 1f7fba2e89ac2a453766e992c313584757668f96 Mon Sep 17 00:00:00 2001 From: Leonabcd123 <156839416+Leonabcd123@users.noreply.github.com> Date: Mon, 9 Mar 2026 15:24:13 +0200 Subject: [PATCH 2/4] Upgrade modern caps lock --- frontend/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index e93a1ac5b9b4..d6fbea473bd8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -24,7 +24,7 @@ }, "dependencies": { "@date-fns/utc": "1.2.0", - "@leonabcd123/modern-caps-lock": "2.2.2", + "@leonabcd123/modern-caps-lock": "3.0.4", "@monkeytype/contracts": "workspace:*", "@monkeytype/funbox": "workspace:*", "@monkeytype/schemas": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc39825ddab2..3adaadf10c76 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -262,8 +262,8 @@ importers: specifier: 1.2.0 version: 1.2.0 '@leonabcd123/modern-caps-lock': - specifier: 2.2.2 - version: 2.2.2 + specifier: 3.0.4 + version: 3.0.4 '@monkeytype/contracts': specifier: workspace:* version: link:../packages/contracts @@ -2333,8 +2333,8 @@ packages: '@kwsites/promise-deferred@1.1.1': resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==} - '@leonabcd123/modern-caps-lock@2.2.2': - resolution: {integrity: sha512-0e8onO4ovdeVj9d/1Ddl1q7nq/p+PNsLscp1yOXQLOiyANUCLq41/H8qh5RDZAOs6j9yNzyxlP5h4o8u2HCwFA==} + '@leonabcd123/modern-caps-lock@3.0.4': + resolution: {integrity: sha512-GUUlmHBu3r6H9KaE9sCxqr0iTSLMev7vdzoovrotyaTSS+AtOrJNdptlWf2DnYAHG8U4EJ++mjyUJdNDjaYI9Q==} '@mapbox/node-pre-gyp@1.0.11': resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} @@ -12074,7 +12074,7 @@ snapshots: '@kwsites/promise-deferred@1.1.1': {} - '@leonabcd123/modern-caps-lock@2.2.2': {} + '@leonabcd123/modern-caps-lock@3.0.4': {} '@mapbox/node-pre-gyp@1.0.11(encoding@0.1.13)': dependencies: From bae8b049d24ee0143105965579c8f1d7c94677c6 Mon Sep 17 00:00:00 2001 From: Leonabcd123 <156839416+Leonabcd123@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:48:01 +0200 Subject: [PATCH 3/4] Only when next --- frontend/src/ts/test/test-timer.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/ts/test/test-timer.ts b/frontend/src/ts/test/test-timer.ts index f166e9f76910..5772f37fcf39 100644 --- a/frontend/src/ts/test/test-timer.ts +++ b/frontend/src/ts/test/test-timer.ts @@ -137,11 +137,14 @@ function layoutfluid(): void { setConfig("keymapLayout", layout as KeymapLayout, { nosave: true, }); - setTimeout(() => { - void KeymapEvent.highlight( - TestWords.words.getCurrent().charAt(TestInput.input.current.length), - ); - }, 1); + + if (Config.keymapMode === "next") { + setTimeout(() => { + void KeymapEvent.highlight( + TestWords.words.getCurrent().charAt(TestInput.input.current.length), + ); + }, 1); + } } } if (timerDebug) console.timeEnd("layoutfluid"); From 8c19c6ee6c274243e747b58cd49550bb7ad3bf82 Mon Sep 17 00:00:00 2001 From: Leonabcd123 <156839416+Leonabcd123@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:08:48 +0200 Subject: [PATCH 4/4] Downgrade modern caps lock --- frontend/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index d6fbea473bd8..e93a1ac5b9b4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -24,7 +24,7 @@ }, "dependencies": { "@date-fns/utc": "1.2.0", - "@leonabcd123/modern-caps-lock": "3.0.4", + "@leonabcd123/modern-caps-lock": "2.2.2", "@monkeytype/contracts": "workspace:*", "@monkeytype/funbox": "workspace:*", "@monkeytype/schemas": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3adaadf10c76..dc39825ddab2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -262,8 +262,8 @@ importers: specifier: 1.2.0 version: 1.2.0 '@leonabcd123/modern-caps-lock': - specifier: 3.0.4 - version: 3.0.4 + specifier: 2.2.2 + version: 2.2.2 '@monkeytype/contracts': specifier: workspace:* version: link:../packages/contracts @@ -2333,8 +2333,8 @@ packages: '@kwsites/promise-deferred@1.1.1': resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==} - '@leonabcd123/modern-caps-lock@3.0.4': - resolution: {integrity: sha512-GUUlmHBu3r6H9KaE9sCxqr0iTSLMev7vdzoovrotyaTSS+AtOrJNdptlWf2DnYAHG8U4EJ++mjyUJdNDjaYI9Q==} + '@leonabcd123/modern-caps-lock@2.2.2': + resolution: {integrity: sha512-0e8onO4ovdeVj9d/1Ddl1q7nq/p+PNsLscp1yOXQLOiyANUCLq41/H8qh5RDZAOs6j9yNzyxlP5h4o8u2HCwFA==} '@mapbox/node-pre-gyp@1.0.11': resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} @@ -12074,7 +12074,7 @@ snapshots: '@kwsites/promise-deferred@1.1.1': {} - '@leonabcd123/modern-caps-lock@3.0.4': {} + '@leonabcd123/modern-caps-lock@2.2.2': {} '@mapbox/node-pre-gyp@1.0.11(encoding@0.1.13)': dependencies: