How to Automate Typing Practice with Personal Scripts

Key Points
  • Personal scripts can generate practice text specifically weighted toward your weakest keys.
  • Bigram analysis (two-letter combinations) pinpoints the transitions that slow you down most.
  • A simple Python script can analyze your error patterns and output targeted practice word lists.
  • This approach is more efficient than generic word lists for targeting specific technique gaps.
  • The custom text mode on this site lets you run any word list you generate through a timed test.

Why Generic Word Lists Have Limits

Generic word lists practice all keys roughly equally — weighted toward common English words, which means some keys get practiced far more than others. The letters E, T, A, O, and I appear constantly. The letters Q, X, Z, and J appear rarely. Your weakness is probably not in the common letters — it's in the rare ones and in specific letter combinations that your fingers find awkward.

A personal practice script targets your actual weaknesses, not the statistical average person's. This is more efficient. If your slow key is V, a generic word list might give you five V-containing words in a 1-minute test. A targeted script gives you fifty.

Finding Your Weak Keys

The first step is identifying which keys actually slow you down. The best way to do this is per-key keystroke timing analysis. When taking a typing test, record the timestamp of each keystroke. The time between consecutive keystrokes (inter-keystroke interval, or IKI) tells you which transitions are slow.

A simple Python analysis approach:

from collections import defaultdict

# Example keystroke log: list of (character, timestamp_ms)
keystrokes = [
    ('t', 0),
    ('h', 95),   # IKI = 95ms (fast)
    ('e', 210),  # IKI = 115ms
    ('v', 520),  # IKI = 310ms (slow - 'ev' transition)
    ('e', 620),  # IKI = 100ms
]

bigram_times = defaultdict(list)
for i in range(1, len(keystrokes)):
    bigram = keystrokes[i-1][0] + keystrokes[i][0]
    iki = keystrokes[i][1] - keystrokes[i-1][1]
    bigram_times[bigram].append(iki)

# Sort by average IKI to find slowest bigrams
slow_bigrams = sorted(
    bigram_times.items(),
    key=lambda x: sum(x[1]) / len(x[1]),
    reverse=True
)[:10]

Generating a Targeted Word List

Once you know your slow bigrams, generate words that contain them. You can use a standard English word list (like the COCA top 5000 words) filtered to words containing your target bigrams:

word_list = ["every", "review", "even", "seven", ...]  # your word source

# Filter words containing the bigram 'ev'
target = 'ev'
practice_words = [w for w in word_list if target in w]

# Output 50 of them for a practice session
import random
session = random.choices(practice_words, k=50)
print(' '.join(session))

Automating Regular Practice Sessions

You can combine the analysis and generation steps into a single script that:

  1. Reads your recent test history (from an export or a local log file)
  2. Calculates your slowest bigrams from keystroke timing data
  3. Generates a targeted word list
  4. Outputs the list to a file you can paste into the custom text test

Running this weekly updates your practice content automatically as your weak spots shift. The keys you struggle with at 50 WPM are different from the ones that hold you back at 80 WPM.

For a ready-made tool that does some of this automatically, see TTYPER explained. For the broader improvement methodology that this scripts approach supports, see how to break through a speed plateau.

Ready to put it into practice?

Take a free typing test and start tracking your progress.

Free Typing Test →