Skip to content
/ typos Public

Typing speed test in terminal written in C++ using ncurses.

Notifications You must be signed in to change notification settings

Iipal/typos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typos

Typing speed test in terminal written in C++ using ncurses.

made by tmaluh a.k.a _ipal a.k.a MrChebys a.k.a ...

Features:

  • You can move across already typped characters with Arrow Keys.
  • Deleting input of current word by pressing Ctrl+Backspace, or if you at the start of the word - this shortcut will move the cursor to begin of the previous word.
  • When words are ended, but time still ticking - you will start typing the same words from the beginning again. (Statistic will not be reset until the time is over)
  • You can reset the current test with Tab, or on the Stats Screen with Enter.
  • Under all the words displaying also prints previous, current, and next word to type with the current character always at the center of the screen.
  • Displaying the timer.
  • Detailed statistics.

Statistics:

  • WPM: The correct way of calculating WPM including corrected typos. Net WPM
  • RAW WPM: WPM without any typos calculations. Gross WPM
  • REAL WPM: Calculating Net WPM, but with all typos what you ever made in your life ... Net WPM v2
  • TYPED: Count of all typed characters.
  • CPS: Characters Per Second.
  • TYPOS: Corrected typos.
  • REAL TYPOS: All typos that you made.
  • ACC: Accuracy with corrected typos.
  • REAL ACC: Accuracy with all typos.

Flags:

  • -h: Prints this help message.
  • -t <seconds>: Number of maximum time to type in seconds. Accepts only positive integer in range: 10 - 240; Default: 60.
  • -w <number>: Number of maximum words to type. Accepts only positive integer in range: 10 - 150; Default: 42;
  • -S <path>: Full path to file where your stats will be saved. Default: ./typos.log;
  • -o <fmt_str>: Stats format string. Valid format options: |wrRtcTCaA; Default: wrR|tc|TC|aA;
    • |: Delimiter.
    • w: Net WPM.
    • r: Gross WPM.
    • R: Net WPM v2.
    • t: Total typed characters.
    • c: Characters Per Second.
    • T: Corrected typos.
    • C: All typos.
    • a: Accuracy with corrected typos.
    • A: Accuracy with all typos.
  • -s: Auto-save your stats at the end. Default: false;
  • -a: Words sorted in alphabetical order. Default: false;
  • -m: Monochrome mode. Default: false;
  • -f: Free typing mode. The timer will not start. Default: false;

Keybindigs:

  • Welcome Screen:

    • Ctrl+C, Ctrl+D, and Esc: Now closing the typos.
    • Any other key will start the typos.
  • While typing:

    • : Moves to the previously typed character.
    • : Moves to the next character. Works only for already typed characters.
    • Backspace: Removing current character.
    • Ctrl+Backspace: Removing current word, or goes to start of the previous.
    • Tab: Fully resetting current typing test(Already typed stats, words, and even timer will be reset). And you will start the test from the beginning.
    • Ctrl+R: Reset everything just like Tab do, but also re-roll words.
    • Ctrl+C, Ctrl+D, and Esc: Now closing the typos.
    • Only printable characters will be prompt to the test (see man 3 isprint).
    • Any other input will be ignored.
  • Stats Screen:

    • Ctrl+C, Ctrl+D, and Esc: Now closing the typos.
    • Ctrl+S: Saves your typing test result to ./typos.log file. By appending new test data to the end of the file and with the current local date at the top of each result.
    • Tab: Restart the test.
    • Ctrl+R: Restart the test and re-roll the words.

!! IMPORTANT !!; My advice is to use Ctrl+C, and Ctrl+D keybindings instead of Esc whatever it's possible. Because of reasons of handling the "Escape Sequences" the Esc-key by itself has a delay in 1 sec.

The Esc is not removed because for some peoples the Esc-key may be a more comfortable way to close the program.


Debug mode

Will show you some additional information about current input with some stats if you need it.

To active this you must rebuild typos with:

make debug_all

Installation the deps.:

sudo apt-get install libncurses5-dev libncursesw5-dev clang

Most of the other tools is already pre-installed in most of Linux distros. but if u still have troubles when building the app:

sudo apt-get install build-essential

Building:

Just make it working:

make

More options for Makefile are described here.

Using the typos:

After successful installation you can run it like this:

./typos

To see the help info about some options:

./typos -h

If you wanted globally access to the typos:

mkdir -p ~/.bin;
git clone https://github.com/Iipal/typos/ ~/.bin/typos;
cd ~/.bin/typos && make re;
sudo ln -P ~/.bin/typos/typos /usr/bin/typos;

Be careful with saving stat log, it always will be stored in the directory where you call the typos.