TypeTrainer is a training program for learning fluid 10-finger keyboard typing.
It is written in vanilla JavaScript with CSS styling.
Due to the program's nature, every part and menu is controlled by key input only.
The main idea is to leave the mouse and trackpad aside and stay focused on keyboard writing.
Once you enter, TypeTrainer tells you to type "day" or "night" depending on your preferred display theme.
When you stop typing midword, you can discover the dynamic select feature, which can be found in every menu.
Say for instance you have already typed the letters "n", "i" and "g" from the selected word "night",
but you want to switch to "day" instead. You can perform this switch simply by pressing "d" in that case.
Once you press the first letter of another select option, you will leave the current word and jump to the other instead.
This will allow you to change your selection at any given time.
In the main menu, you can create a local account by typing "profile" or type "change" to enter settings.
By typing "mission" you will enter the main training area of TypeTrainer.
Here you can choose a difficulty level and start a training mission.
You can always return to the main menu by pressing the "Esc" button on your keyboard.
In every mission, you have the chance to discover a randomly selected ASCII-Creature, depending on your selected level.
Once you have seen this creature, it will be displayed on your personal profile page.
Maybe you can collect these creatures after a successful run as a reward in the future.
For now, you will just see an analytics graph in addition to your type-speed and accuracy after each session.
If you are logged in with your local account, each run will be saved to your browser's local storage.
In local storage, you can set up multiple accounts that can be managed within the profile page.
When TypeTrainer is opened with Chrome browser, you can install it as a local PWA application.
In Settings (typed "change" in the main menu) you can switch between different keyboard layouts like "macDE" or "macUS".
These layouts are stored in JSON format in the project's data folder. Feel free to edit these JSONs or include new layouts as you like.
The available letters for every level are stored in the typeLevel.json file right next to the layout JSONs.
This file can be configured to your needs as well.
Every time the client/player starts a mission, a randomized array of these letters is created.
Each letter is repeated three times for muscle memorization.
To avoid unnecessary calculation while in the type mission, both the typing array and the keyNr-array are created beforehand.
Every time the user hits the right letter, it is simply pushed out of both arrays.
The keyNr-array is used to highlight the following key on the virtual keyboard for visual guidance.
For analytics, an error array is created which holds the time delay between each successful hit as well as the false key hits.
Later these arrays can be used to calculate common mistakes. For now, it is just used to calculate the accuracy and type speed.
If you want to join the development of TypeTrainer, feel free to fork the project and send some pull requests...