Skip to content

In < 1000 lines of code, practice any dictionary and get targeted feedback and statistics per character and pair of characters, like Keybr. Right now, common Rust programming keywords are the dictionary.

License

Divide-By-0/keybr-with-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keybr-with-stats

In < 1000 lines of code, practice any dictionary and get targeted feedback and statistics per character and pair of characters, like Keybr. Right now, common Rust programming keywords are the dictionary.

Demo here: https://keybr.onrender.com/

image

Compile

yarn install
tsc typingAnalysis.ts

Run

Open index.html in browser.

Improvements

If you're interested in this and want to contribute, there are a lot of cool things you can add!

  • Add the ability for people to select different dictionaries or programming languages
  • Add the ability to make this an extension inside vscode, that tracks and gives real time stats as you work
  • Call the localstorage getter code on startup to populate your profile with your past stats
  • Make the UI nicer and closer to keybr's
    • Lay out the keys in a grid instead of a list
    • Put results in multiple coloumns to reduce scroll distance

Done

  • Ignore keystrokes that take more than 5 seconds, to assume you took a break

Info

This code was ~80% written with GPT-4 in Cursor IDE. Here was the initial prompt:

generate typescript code for a simple browser website that analyzes your typing. have it display a few sentences at a time that it asks you to type. overlay your typing beneath it, highlighting red characters when you get something wrong, green if its correct, and yellow if you previously got it wrong but then went back and got it correct. if a letter is wrong, do not allow progression of the cursor and force the user to backspace their errors.

display at the bottom the statistics for each lowercase letter, symbol, and capital letter, and highlight it lighter if the accuracy-adjusted WPM is high, and darker if its lower. calculate this average as a time-adjusted weighting of the history where recent updates are more heavily considered.

also show on the side the 10 most missed individual keys and the 10 most missed pairs of keys, including shift and punctuation.

have a nice user interface like keybr.

Linked here is the full transcript of the discussion, not including the Cursor prompts and manual tweaks.

About

In < 1000 lines of code, practice any dictionary and get targeted feedback and statistics per character and pair of characters, like Keybr. Right now, common Rust programming keywords are the dictionary.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published