DEV Community

Cover image for TIL: Building a Simple Typing Practice Tool
Mai Chi Bao
Mai Chi Bao

Posted on

TIL: Building a Simple Typing Practice Tool

πŸ“ Today I Learned: Building a Simple Typing Practice Tool

I built a really small web-based tool to enhance typing skills with real-time feedback.

It’s just a single HTML file β€” no backend, no frameworks, no setup. You open it in your browser and start typing πŸš€.


πŸ“‘ Table of Contents


πŸ’­ Why I Built This

Most typing practice tools I tried don’t support Vietnamese text well:

  • Their UI looks broken or ugly when practicing with Vietnamese.
  • They rarely offer fresh, real-world Vietnamese content.
  • I wanted to auto-generate practice text from news so I don’t get bored.
  • I also wanted to customize the metrics I care about (e.g., word accuracy, correct WPM).
  • Plus, having a dark mode toggle and a cleaner UI makes practice more enjoyable.

That’s why I created this simple tool β€” just for myself at first β€” but it turned out useful enough to share.


✨ Features

  • Works everywhere β€” pure HTML, CSS, and JS.
  • Auto-fetches Vietnamese πŸ‡»πŸ‡³ or English πŸ‡ΊπŸ‡Έ news text for practice.
  • Customizable reference text (you can paste or write your own).
  • Tracks:
    • Time (seconds)
    • Character Accuracy (%)
    • Word Accuracy (%)
    • Words Per Minute (WPM)
    • Correct WPM
    • Progress (typed vs total characters)
  • Real-time color coding: βœ… correct, ❌ incorrect, and 🎯 current character.
  • Auto-scrolls while typing.
  • Completion message when done.
  • Dark mode + Reset button.

⚑ How It Works

  1. You type directly on the displayed reference text.
  2. Each keystroke updates:
    • Character accuracy β†’ (correct chars Γ· total typed).
    • Word accuracy β†’ (correct full words Γ· attempted words).
    • WPM β†’ counts total words per minute (including mistakes).
    • Correct WPM β†’ only correct words per minute.
  3. A progress bar and completion message keep you motivated.
  4. You can fetch real news text from VnExpress and practice with something fresh.

πŸ–₯️ Demo Screenshot

You can try my Simple Typing

You can also visit my repo here πŸ‘‰ mrzaizai2k/simple-typing.

Just download the typing.html file, open it in any browser β€” and you’re ready to practice πŸš€.


πŸ’‘ Why I Like It

  • Minimalistic: no dependencies, just one .html file.
  • Real-time feedback keeps me aware of typing mistakes instantly.
  • The news fetch feature means I can always practice with new content, instead of boring lorem ipsum.
  • Great for improving not just speed, but also accuracy.

πŸ”— Reference

All the code is live here on my GitHub:

πŸ‘‰ mrzaizai2k/simple-typing

Feel free to clone it, star it ⭐, or ask me anything.

Top comments (1)

Collapse
 
mrzaizai2k profile image
Mai Chi Bao

β€œFinally a typing tool that works well with Vietnamese β€” I really need this πŸ‘β€