Terminal-based adaptive typing practice with progressive key learning
Project description
TypeFast - Terminal-Based Adaptive Typing Practice
A CLI typing practice application with adaptive learning that tracks your progress and focuses on the keys you need to practice most.
Features
Core Features
- Adaptive Key Learning: Starts with home row keys and progressively unlocks new keys as you master current ones
- Real Word Practice: Always uses actual English words, never random characters or nonsense
- Intelligent Targeting: Continuously analyzes your typing to find keys you struggle with and selects words containing those letters
- Progressive Text Quality: Starts with words heavily targeting your weak keys (seems random), transitions to natural sentence-like text as you improve
- Real-time Statistics: Tracks WPM (words per minute) and accuracy
- Per-Key Analytics: Monitors accuracy and speed for each individual key
- Difficulty Scoring: Automatically identifies which keys need more practice
- Persistent Progress: Saves your statistics between sessions
- Smart Key Unlocking: Unlocks new keys when you've mastered current ones
Additional Features
- Clean terminal UI with color-coded feedback
- Real-time visual difficulty bars for each key
- Session tracking across multiple practice sessions
- Natural text generation using common bigrams
- Immediate visual feedback (green = correct, red = error)
Installation
Requirements
- Python 3.6 or higher
- Unix-like terminal (Linux, macOS, WSL on Windows)
Quick Install
One-line installer (after setting up on GitHub):
curl -sSL https://raw.githubusercontent.com/YOUR_USERNAME/typefast/main/install.sh | bash
Manual install:
- Download the script:
curl -O https://raw.githubusercontent.com/YOUR_USERNAME/typefast/main/typefast.py
chmod +x typefast.py
Or simply copy the typefast.py file to your system.
- Run it:
python3 typefast.py
Optional: Install Globally
To make it accessible from anywhere:
# Copy to local bin
sudo cp typefast.py /usr/local/bin/typefast
sudo chmod +x /usr/local/bin/typefast
# Now you can run it from anywhere
typefast
Usage
Starting the App
python3 typefast.py
Or if installed globally:
typefast
How to Practice
-
Type the displayed text: The current character to type is highlighted with a yellow background
-
Color feedback:
- Green = correctly typed
- Red = error
- Dim gray = not yet typed
- Yellow highlight = current character
-
Controls:
- Type normally to practice
- Press
Backspaceto restart current exercise - Press
Ctrl+Cto quit and save progress
Understanding the Interface
TypeFast - Adaptive Typing Practice
WPM: 45 | Accuracy: 97% | Keys: 156 | Errors: 5
Unlocked keys: [space]adfjkls
────────────────────────────────────────────────
sad all ask fall lads
Key Difficulty (practice needed):
's': ████████████████░░░░ 82.3 (acc: 85.2%)
'l': ████████████░░░░░░░░ 65.1 (acc: 89.5%)
'f': ██████░░░░░░░░░░░░░░ 32.4 (acc: 95.1%)
- WPM: Your current words per minute
- Accuracy: Percentage of correct keystrokes
- Keys: Total keys typed this session
- Errors: Total errors this session
- Unlocked keys: All keys currently available for practice
- Key Difficulty: Shows which keys need the most practice (higher = needs more work)
Progressive Learning System
The app uses an intelligent progressive system with real word practice:
- Start with home row: You begin with
asdf jkland space - Practice with targeted words: Type real English words that heavily feature your weakest keys
- Master current keys: Practice until your accuracy improves (>75%)
- Unlock new keys: When you've mastered current keys, new keys unlock automatically
- Transition to natural text: As your accuracy increases (>90%), word selection becomes more natural and sentence-like
- Expand your vocabulary: Keys unlock in order of frequency in English
The word selection is intelligent:
- Below 75% accuracy: 90% of words contain multiple difficult keys (appears random but targets weak spots)
- 75-90% accuracy: 60% targeting, beginning to form more natural sequences
- Above 90% accuracy: 30% targeting, mostly natural sentence-like text
Tips for Effective Practice
- Focus on accuracy first: Speed will come naturally with accuracy
- Watch the difficulty bars: They show which keys need more attention
- Practice regularly: Short, frequent sessions are more effective than long ones
- Don't look at the keyboard: Force yourself to learn by feel
- Maintain good posture: Proper ergonomics prevent fatigue
Data Storage
Your progress is saved in ~/.typefast_stats.json and includes:
- Per-key accuracy statistics
- Per-key speed measurements
- Total keys typed
- Session count
- Unlocked keys
You can reset your progress by deleting this file:
rm ~/.typefast_stats.json
How the Adaptive Learning Works
Difficulty Scoring
Each key gets a difficulty score (0-100) based on:
- Accuracy (70% weight): How often you type it correctly
- Speed (30% weight): How fast you type it compared to average
Key Unlocking Algorithm
New keys unlock when:
- Average difficulty of current keys < 20%
- You've typed at least 50 keys per unlocked key (sufficient practice)
Practice Text Generation
The generator creates text using real English words that:
- Heavily feature your weakest keys early on (words appear random but are specifically chosen)
- Gradually transitions to more natural word sequences as you improve
- At high accuracy, creates sentence-like text with occasional difficult key practice
- Always uses actual English vocabulary - no nonsense words
Technical Details
- Language: Python 3
- UI Library: curses (built-in)
- Storage: JSON file in home directory
- Statistics: Rolling window of last 50 keystrokes per key
- Performance: Updates at 10 FPS (100ms refresh)
Customization
You can modify the script to customize:
- Starting keys: Change
self.unlocked_keysinTypingStats.__init__ - Unlock threshold: Modify the difficulty threshold in
should_unlock_new_key() - Text length: Adjust
lengthparameter ingenerate_text() - Key unlock order: Edit
unlock_orderinget_next_key_to_unlock() - Colors: Modify
curses.init_pair()calls in therun()method
Troubleshooting
Issue: Colors not showing
Some terminals don't support colors. Try a modern terminal like iTerm2, Alacritty, or Terminal.app.
Issue: Keys not registering
Make sure your terminal window is focused and you're not in a screen/tmux session that's capturing keys.
Issue: Display looks wrong
Resize your terminal to at least 80x24 characters for best results.
Issue: Permission denied
Make sure the script is executable:
chmod +x typefast.py
Contributing
This is a single-file Python script, making it easy to modify. Feel free to:
- Add new features
- Improve the text generation algorithm
- Add word-based practice modes
- Implement lessons or structured courses
- Add support for special characters and numbers
License
MIT License - feel free to use, modify, and distribute.
Happy typing! 🎹✨
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file typefast-1.0.0.tar.gz.
File metadata
- Download URL: typefast-1.0.0.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef17f3e249cb57d4ef7516df76faa50bfe28457b3beaa7c351a16fa506401875
|
|
| MD5 |
123748a6b9b379a00239c27ae4b1e99e
|
|
| BLAKE2b-256 |
87ee41027d32ea528517a708add570c23948049096762c77d4acac4a2dbf0898
|
File details
Details for the file typefast-1.0.0-py3-none-any.whl.
File metadata
- Download URL: typefast-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edc922ae434ffcc8d9fce5876c37f2cdf7381205c43580b1cceb2a5a986beabd
|
|
| MD5 |
59606cb34f3df658f5c0b54ee1cef0ef
|
|
| BLAKE2b-256 |
637ded4014e6855741be10d7712cc47a09f6acd33493842d266202ee61b0fafe
|