Skip to content

justindotdevv/typical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typical

A fast, terminal-based typing test application built in Rust with crossterm.

Features

  • Multiple modes: Passage, Timed (10s/30s/60s), No Punctuation, and Code
  • Real-time stats: WPM, accuracy, and elapsed time displayed while typing
  • Persistent history: Results saved to disk (XDG-compliant)
  • Diff-based rendering: Efficient terminal updates with dirty-row tracking
  • Responsive layout: Auto-centering with word-wrapping and resize support

Installation

cargo build --release

The binary will be available at target/release/typical.

Usage

./target/release/typical

Controls

Screen Key Action
Menu j/, k/ Navigate menu
Menu Enter Select
Menu q/Esc Quit
Typing Any character Type
Typing Backspace Correct last char
Typing Esc Back to menu
Results r Restart
Results m Back to menu
Results q/Esc Quit
History j/, k/ Scroll records
History Esc Back to menu

Project Structure

src/
├── main.rs      # Entry point, terminal setup, event loop
├── app.rs       # Application state, game logic, WPM/accuracy
├── render.rs    # Diff-based renderer with double-buffering
├── layout.rs    # Word-wrap and screen position computation
├── passage.rs   # Typing passages (normal, no-punct, code)
└── history.rs   # Persistent result records (JSON/XDG)

Development

# Run (debug)
cargo run

# Run (release)
cargo run --release

# Build
cargo build

# Check without building
cargo check

# Run Clippy lints
cargo clippy

# Run tests
cargo test

License

MIT

About

A terminal typing speed test

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages