feat: add "train second key" guided lesson option - #623
Open
jpds wants to merge 5 commits into
Open
Conversation
jpds
force-pushed
the
feat/train-next-letter
branch
9 times, most recently
from
July 31, 2026 18:12
828065b to
ef54873
Compare
Simulates a human typing through the full American English alphabet in the guided lesson with a randomized per-round typing speed, checking that keys never regress, unlock one at a time, and that the target key, its toast, and its confidence state stay consistent throughout. Others included tests cover the toasts, the on-screen keyboard's hesitation-pointer highlighting the physically correct key, and a mistyped-then-corrected character rendering in the theme's miss color.
Writes new guided-lesson settings to `localStorage` and reloads mid-run. This checks progress survives the `GuidedLesson`/`Progress` reconstruction: * `naturalWords` and a target-speed ramp shouldn't lose already-earned unlocks * `alphabetSize` can force-include several keys in one round * `recoverKeys` can legitimately re-lock a key past the guaranteed first 6.
Occasionally mistypes-then-corrects the displayed character instead of typing it cleanly, mirroring a human fumble.
Adds lesson.guided.trainSecondKey: previews and unlocks a second key alongside the primary focus, one letter at a time.
Solid outline in --accent, distinct from the focused key's --secondary-l2.
jpds
force-pushed
the
feat/train-next-letter
branch
from
July 31, 2026 18:49
ef54873 to
6cb7f90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a "Train second key" option to the guided lesson settings. When enabled this mixes in with 20% probability either the next letter to train or the second-weakest letter for a user when all letters are unlocked.
I've increased my target typing speed for a layout and I found that when I had finally mastered a target key, the next key lessons would break that momentum and the previously unlocked key would lag again, causing a yo-yo between the two to happen.
Samples taken from the next-key are not factored into unlocking it, the words are only there to accustom the user to the motion of the next key.