Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keybr.py

Version 1.2.0 — A terminal-based typing trainer inspired by keybr.com, built entirely in Python using the curses library.

Idea credits: The adaptive learning concept (progressive letter unlocking, per-letter confidence scoring, bigram tracking) was inspired by aradzie's keybr.com.

Features

  • 6 Practice Modes to improve different aspects of your typing
  • Real-time WPM (words per minute) tracking
  • Accuracy tracking with per-letter statistics
  • Persistent progress saved across sessions (~/.keybr_stats.json)
  • Color-coded feedback for correct and incorrect keystrokes
  • Statistics dashboard with best WPM, averages, weak letters, and session history
  • Keybr Offline mode with adaptive learning, progressive letter unlocking, and bigram tracking
  • Keyboard Diagnostic — a professional visual keyboard tester with live key states, coverage tracking, guided and gaming modes, NKRO monitoring, and more

Practice Modes

Mode Description
Common Words High-frequency English words (365 words)
Hard Words Challenging vocabulary (159 words)
Sentences Full sentences for flow practice (25 sentences)
Symbols & Punctuation Sentences with !, ?, ", :, ;, (), [], $ and more
Capital Letters Real sentences with proper capitalization rules
Keybr Offline Adaptive learning (keybr.com style) - progressive letter unlocking, weak-key targeting, bigram tracking
Keyboard Test Visual keyboard diagnostic - live key layout, coverage tracker, guided & gaming modes, NKRO/anti-ghosting, repeat-rate & press-duration timing, scan-code info

Requirements

  • Python 3
  • A terminal that supports curses (Linux / macOS)
  • Windows users will need windows-curses (pip install windows-curses)

Usage

python3 Keybr.py

Controls

Key Action
/ Navigate the menu
Enter Select a mode
ESC Return to menu during practice
Backspace Delete the last character
Any printable key Type the displayed text

Keyboard Diagnostic Mode

A professional in-terminal keyboard tester (select Keyboard Test from the menu):

  • Full layout — function row, QWERTY, nav cluster, arrows, and numpad with live key states
  • Key states — pressed (green), held (yellow), released (fades back to gray)
  • Modifier glow — Ctrl (red), Alt (blue), Shift (purple), Super/Win (cyan), combining naturally
  • Coverage tracker — shows X/Y keys tested and Keyboard Successfully Tested when complete
  • Guided mode — highlights the next key to press and waits for the correct one
  • Gaming mode — emphasizes WASD / QER / 1-5 / modifiers / arrows for anti-ghosting tests
  • NKRO / anti-ghosting — simultaneous-key counter with max detected
  • Repeat-rate & press-duration — real-time Hz, repeat delay, and hold time in ms
  • Scan-code info — key name, virtual key code, unicode character, device info
  • Event history — scrolling, timestamped, capped at the latest 50 events
  • Sound feedback — optional terminal-bell clicks (toggle with Ctrl+T)

Keyboard Test controls

Key Action
Ctrl+F Free mode (press anything)
Ctrl+G Guided test mode
Ctrl+B Gaming mode
Ctrl+T Cycle sound: off → soft click → mechanical
Ctrl+Q Return to menu

Terminal limitations: a terminal cannot report key release events, so a key is treated as released after a short silence. CapsLock / Alt / Win / Menu / NumLock / PrtSc / ScrLk / Pause / media keys produce no dependable terminal event and are excluded from the coverage total. Shift is inferred from uppercase/shifted symbols and Ctrl from control characters.

How It Works

  1. Select a practice mode from the main menu
  2. Type the displayed text as accurately and quickly as possible
  3. Green = correct, Red = incorrect, Yellow underline = current character
  4. When finished, your results are shown and the next round starts automatically
  5. Press ESC at any time to return to the menu

Statistics

Your progress is saved to ~/.keybr_stats.json after every session, including:

  • Total sessions completed
  • Best and average WPM
  • Accuracy per letter (to identify weak points)
  • Session history (last 100 sessions)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Credits

Author

Created by johnvexcoder - github.com/johnvexcoder

Releases

Packages

Contributors

Languages