Help

CodeKeys measures every key and symbol you type, finds your weakest unit, and generates practice code that over-weights it until it reaches your target speed. Everything runs in your browser.

New here? Show the practice screen guide: a short walk through the code area, the on-screen keyboard, your units, stages and the other ways to practise.

How speed and accuracy are measured

One definition is used everywhere: the live display, lesson results, stats and exports.

  • Target character: every character you must type, including Enter. Indentation inserted automatically is excluded; in type-indent mode each indentation level counts as one character, whether typed with Tab or spaces.
  • Keystroke: any key that produces or deletes a character. Shift and other modifiers alone are not keystrokes.
  • Error: a keystroke that does not match the expected character. In stop-on-error mode the caret stays put and each wrong press is one error.
  • Correction: a Backspace. Counted and shown separately, never as an error.
  • Active time: from the first keystroke to the last correct keystroke, with any pause over 2 seconds counted as 2 seconds.

WPM = (C / 5) / (T / 60000)

Accuracy = (K - E) / K

C is the number of target characters correct at the end of the lesson (characters left wrong in type-through mode do not count), T is active time in milliseconds, K is keystrokes excluding Backspace, and E is errors. Lessons under 20 target characters or 3 seconds of active time are not saved to your stats.

Example (type-through): typing if (x) { (8 characters) in 4 seconds with one wrong key and one Backspace gives (8 / 5) / (4 / 60) = 24 WPM and (9 - 1) / 9 = 89% accuracy.

How lessons adapt

Each unit (a key, a symbol cluster such as => or ();, a keyword, a casing pattern or a structure such as a new indented line) gets a score:

score = (target time / smoothed time per keystroke) x accuracy^2

Time is smoothed with an exponential moving average (alpha 0.1) and accuracy is measured over the last 50 occurrences. A unit is mastered at a score of 1.0 or more with at least 30 samples and 96% accuracy. The lowest-scoring unit becomes the focus, and the next lesson is built around it as keybr does: in letter lessons every word contains it, and in code lessons nearly every statement does (identifiers are picked to contain a focus letter). When every unlocked unit is mastered, the next unit unlocks: letters (home row first), punctuation, brackets, operators and digits (including ^, ~, shifts and compound assignments), strings and casing (including escapes such as \n), language clusters and keywords (control flow, types, null, this and the rest of the language, most used first, then idioms such as .length or is not), then real snippets. Opening brackets unlock with their closing partner.

The default target is 35 WPM; change it in Settings (20-120). Click any unit above the practice area to see its details: speed now and at its best, accuracy, a learning curve and a forecast. From there you can drill it for the next 5 lessons, or unlock a locked unit straight away. The stage picker lets you jump forward to symbols or code, or back to an earlier stage, at any time.

When new units unlock

By default (as on keybr) a new unit unlocks once every unlocked unit has reached your target speed at least once. Your best speed is remembered, so one slow lesson does not hold you back. Units you mastered but have slipped on stay in the mix as review and are picked as focus until they recover. Choose Settings → When new units unlock → Recover weak units first if you want new units to wait until every unit is at target right now.

Forecasts

Each unit keeps your speed for its last 30 lessons. Once there are enough points, a curve is fitted to them (a straight line or a gentle curve, depending on how many lessons you have) to estimate how much you gain per lesson and roughly how many lessons it will take to reach your target. No forecast is shown when the points are too scattered for the estimate to mean anything.

Slow transitions and mistakes

CodeKeys also times every pair of characters that involves a symbol, such as ) followed by ;, and records which key you pressed when you missed. The Stats page lists your slowest transitions (with a button to drill one) and your most common mistakes. After a lesson you get a tip for the mistake you made most, for example a missed Shift or a neighbouring key.

Practice options

  • On-screen keyboard: highlights the next key, the finger to use, and which Shift or AltGr to hold. Turn it or the finger colours off in Settings.
  • Forgive slips: in stop-on-error mode, if you skip a character or hit a wrong key and then type the character after it, the lesson moves on instead of waiting. The slip still counts as an error.
  • Auto-close brackets and quotes (IDE mode): set per language. The closing ) ] } and quotes an editor would insert are filled in for you and, like auto-indentation, are not counted in C or K above. It is off by default because it makes your speed look higher than the typing you actually did.
  • Keyboard layout: US QWERTY, Dvorak, Colemak, UK, German, French, Spanish, Italian and Nordic. The layout sets the on-screen keyboard, the heatmap, the finger hints and the unlock order: within a stage, symbols that need AltGr unlock after the ones that do not. Detect suggests a layout in browsers that can report it; you always confirm it.
  • Caret, whitespace markers, code font and sounds: purely cosmetic; change them in Settings.
  • Daily goal: minutes of practice per day across all languages (15 by default, 0 turns it off). Stats shows your practice calendar, day streaks, accuracy streaks and milestones.

Practising your own code

On the practice screen, open Custom → Your own code and import files or a whole project folder. The files are read in your browser; functions and methods of 4-25 lines become practice snippets, and the names you use appear in generated drills. Choose Practise my code to get the snippets densest in your weakest units. Imported code never leaves your browser and can be removed at any time.

Keyboard shortcuts

KeyActionWhen
EscRestart the lessonAlways
Tab, then EnterSkip the lessonAlways (Tab alone does nothing in auto-indent mode)
Shift+TabRemove one indentation levelType-indent mode
BackspaceCorrect the previous character (counted as a correction, never an error)Type-through mode
Ctrl+/Open this cheat sheetAlways
?Open this cheat sheetBetween lessons only (? is typeable code)
Any keyNext lessonOn the lesson result
1 / 2 / 3 / 4Switch to Java / Python / JavaScript / TypeScriptBetween lessons only

Where your progress is stored

There is no account and no server. Lessons, scores and settings are stored in this browser's IndexedDB, and the app works offline after the first visit. That means:

  • Clearing site data, using a private window, or the browser running low on space can delete your progress.
  • Safari deletes website data after 7 days of browsing without a visit to the site. If you use Safari, export a backup regularly.
  • Two computers have two separate histories. Export on one and import on the other; lessons are merged by id.

Use Settings → Export backup to download everything as one JSON file, and Import backup to restore or merge it. CodeKeys asks the browser to protect its storage after your first lesson; Settings shows whether it agreed.

FAQ

Why are brackets not closed for me?

Auto-closing brackets would inflate your speed, so by default every character you see is one you type. If you want to practise the way your editor behaves, turn on IDE mode for that language in Settings.

Do generated drills compile?

No. Drills look like the language (balanced brackets, consistent indentation) but are not meant to run. Real snippets are real code.

Does autocomplete make this pointless?

Autocomplete finishes names, but symbols, brackets, operators and casing are still typed by hand. That is the gap CodeKeys trains.

Can I use it on a phone?

CodeKeys is built for physical keyboards on desktop browsers. Chrome and Edge are fully supported; Firefox and Safari are best-effort.

Is my pasted code sent anywhere?

No. Pasted code is processed in the browser and stored only if you press Save. Imported files are read in the browser and the extracted snippets are stored only in this browser.

Where does the practice code come from?

Real snippets are functions taken from permissively licensed open-source projects, pinned to an exact version, with the project and licence shown under each snippet. Generated drills are built from patterns learned from that code.

Known issues

  • On some international layouts the backtick is a dead key; press it twice or follow it with a space, as your layout requires.
  • Firefox and Safari are tested each release but are best-effort; please report anything that behaves differently.
  • Progress does not sync between browsers or computers. Use export and import.