TYPING RUN TELEMETRY / SESSION RECORD
Read a typing run as a session record
This page maps the editor’s duration, text selection, character checks, metric formulas, heatmap states, two-player panel, and public-score path to the code currently visible in the tool.
- 30 / 60 / 120 seconds · initial 60
- beginner / intermediate / expert · initial intermediate
- solo / two-player panel · initial solo
Session control strip
Before a run, the editor exposes three selectors. These are editor settings rather than labels about a person or their typing.
- DURATION — 30 · 60 · 120
The duration selector offers 30, 60, and 120 seconds. Its initial value is 60 seconds.
- DIFFICULTY — 3 TEXT SETS
The selector offers beginner, intermediate, and expert. Its initial value is intermediate.
- MODE — SOLO · 2 PLAYERS
The editor begins in solo. The other visible panel is a two-player mode with separate inputs.
Text source and selection
Text arrays are embedded for each displayed language and each difficulty. At initialization and again at test start, the editor uses Math.floor(Math.random() * texts.length) to take one entry from the applicable array.
Run clock and exit points
The timer moves while a test is started and unfinished. A run ends when timeLeft === 0 or when an entered input reaches the current text length.
01 · SOLO — Start control enters the run
In solo mode, the Start control calls the start path directly and then focuses the solo input.
02 · TWO PLAYERS — 3 → 2 → 1 before inputs
In two-player mode, the Start control begins a 3–2–1 countdown. The start path then focuses the Player 1 input.
03 · FINISH — Zero time or text-length boundary
The finish path is reached at timeLeft === 0, or after an input length is at least the current text length.
Per-character measurement board
For an input, the editor walks its characters by position and checks each one against currentText at that position. Matching positions contribute to correctChars; totalChars is the input length.
- WPM — round((correctChars / 5) / elapsedMinutes)
Calculated only when elapsedMinutes is greater than 0.
- ACCURACY — round((correctChars / totalChars) * 100)
Calculated only when totalChars is greater than 0.
- PROGRESS — round(currentIndex / currentText.length * 100)
currentIndex follows the current input length.
Heatmap and state ledger
When a newly added solo character has an expected character, the expected character is lowercased and counted. An error is counted when typedChar !== expectedChar.
CURRENT TEST — Only shown with current data
The current-test heatmap card is rendered only when its current key-error data has entries.
CUMULATIVE — typingSpeedTest_keyErrors
On initialization, the editor reads cumulative key errors from localStorage under typingSpeedTest_keyErrors. At a solo finish, current errors are merged and written under that key.
RESET — Remove the key
The heatmap reset control removes typingSpeedTest_keyErrors and clears the cumulative state shown by the UI. The cumulative card is rendered only when data exists.
Solo record and two-player panel
The visible modes use distinct input state. The two-player panel is described here only as the editor’s two-input UI.
SOLO HISTORY — At most five UI entries
A solo finish prepends its result with [result, ...slice(0, 4)]. This history is React state used in the UI.
PLAYER INPUTS — Separate tracked fields
Player 1 and Player 2 have respective input, index, correct-character, total-character, WPM, and accuracy state.
RESULT LABEL — WPM branch
At a two-player finish, Player 1 wins only when player1Wpm > player2Wpm; Player 2 wins only when the reverse is true; otherwise the result is a tie.
Optional public-score path
After a solo finish, a WPM value above 20 opens a dialog. The name field is optional and has a maximum of 100 characters before the submission action.
DIALOG — Optional name and submit action
The dialog sends the solo WPM, accuracy, duration, difficulty, language, and a trimmed name when one is entered.
SERVER INPUT — Accepted field bounds
saveScore accepts an integer WPM of at least 0, an integer accuracy from 0 through 100, an integer duration, a beginner/intermediate/expert difficulty, and a language string up to 10 characters; the server inserts the submitted record.
PUBLIC SCORE LIST — Language + difficulty query
The score query filters by language and difficulty. The UI requests limit 10; the query orders WPM descending and then accuracy descending.
Scope notes
- This record describes the editor paths and formulas shown in the current code.
- Text selection is array-based and uses the displayed language and selected difficulty.
- A public-score submission is user input sent through the score path; this page does not treat it as a verification step.
- The score list query has its stated filters, order, and requested UI limit; this page does not state whether an entry will appear.
Continue with adjacent tools
Each linked tool has its own controls and result path.
- Random Picker Wheel
Set entries in a separate wheel interface and inspect its selection panel.
- Coin Flip
Open the separate coin interface for a two-sided result.
- Sudoku
Open a grid-based puzzle interface with its own controls.
Questions about the session record
Which session controls are initially selected?
The initial values are 60 seconds, intermediate difficulty, and solo mode. The duration selector offers 30, 60, and 120 seconds; difficulty offers beginner, intermediate, and expert.
How is a text chosen?
For the selected language and difficulty, the editor chooses an array entry with Math.floor(Math.random() * texts.length) at initialization and at test start.
How are WPM, accuracy, and progress calculated?
WPM is round((correctChars / 5) / elapsedMinutes) when elapsedMinutes is greater than 0. Accuracy is round((correctChars / totalChars) * 100) when totalChars is greater than 0. Progress is round(currentIndex / currentText.length * 100).
What does the heatmap record?
For a newly added solo character, the expected character is lowercased and counted. typedChar !== expectedChar increments its error count. Cumulative errors use the typingSpeedTest_keyErrors localStorage key, and Reset removes that key.
What does the public score dialog send?
After a solo finish with WPM above 20, the dialog can send an optional name of up to 100 characters together with the score fields. The server accepts the documented integer and enum bounds and inserts the submitted record.
Open the typing-session controls
Select a duration, difficulty, and mode in the editor, then inspect the visible per-character state and metrics.