* Rewrite input system to use <input> content
* Tab/Escape, Backspace and Enter are always handled by
$(document).keydown.
* The rest of characters are handled by either $("#wordsInput").on("input")
(default) or $(document).keydown (layout emulation).
* New special handling for dead keys, compose keys and diacritics in
general with the new regex Misc.trailingComposeChars.
input-controller.js has been updated to use the above changes:
* handleBackspace() replaced with simplified backspaceToPrevious().
On PC, a space is immediately re-added to the end of the input to make
use of the browser/OS's Backspace. This lets the browser handle input-
specific things like ctrl+backspace.
* handleSpace() refactored a bit to repeat less logic when word is correct
or incorrect.
* test-ui.js updated to highlight the Misc.trailingComposeChars
correctly, and also refactored a bit to make logic easier to follow.
* AFK checking has also been simplified, now just set with a boolean
flag (TestStats.) setKeypressNotAfk() instead of checking every key and
modifier press (so incrementKeypressMod() was removed as it wasn't used
for anything else).
* Refactor input controller
New function isCharCorrect().
* Remove caps lock backspace setting
Not supported with the input rewrite anymore because we're relying on the
browser's/OS's actual backspace effects. There's no way to emulate this
keypress.
* Refactor input controller
* Reimplement opposite shift mode
* Reimplement the layout emulator
* Fix replay events for input rewrite
Now it's more flexible for a variable amount of backspacing or letter
replacing.
* Pad input with space to handle backspace on mobile
Backspace isn't fired as an event on current mobile browsers, so I worked
around that by adding a permanent space at the start of the input and
treating its removal as a fallback to Backspace to the previous word.
* Force caret to end of input on focus
Fixes initial selection on iOS.
* Use offsetTop from the DOM instead of TestUI
I didn't wanna mess too much with what happens in test-ui.js. Basically,
on a restart after having completed a test, TestUI.activeWordTop is always
wrong for some reason. This caused swipe/instant input after a restart to
always drop the first few characters.
* Prevent pasting on the input
* Revert "Reimplement opposite shift mode"
This reverts commit 9a716ad39b004f0719b05f486465ea03060430ca.
* Use key code to check opposite shift usage
Today I learned what closure actually meant.
* Accept all whitespace as word space
|
||
|---|---|---|
| .github | ||
| backend | ||
| src | ||
| static | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| firebase.json | ||
| gulpfile.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
About
Monkeytype is a minimalistic and customizable typing test. It features many test modes, an account system to save your typing speed history, and user-configurable features like themes, sounds, a smooth caret, and more.
Features
- minimalistic design with no ads
- look at what you are typing
- focus mode
- different test modes
- punctuation mode
- themes
- quotes
- live wpm
- smooth caret
- account system
- command line
- and much more
Discord bot
On the Monkeytype Discord server, we added a Discord bot to auto-assign roles on our server. You can find its code over at https://github.com/Miodec/monkey-bot
Bug report or Feature request
If you encounter a bug or have a feature request, send me a message on Reddit, create an issue, create a discussion thread, or join the Discord server.
Want to Contribute?
Refer to CONTRIBUTING.md.
Code of Conduct
Before contributing to this repository, please read the code of conduct.
Credits
Montydrei for the name suggestion.
Everyone who provided valuable feedback on the original Reddit post for the prototype of this website.
All of the contributors that have helped with implementing various features, adding themes, fixing bugs, and more.
Support
If you wish to support further development and feel extra awesome, you can do so here.
