* 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