It doesn't need to be this general as the issue is mostly about
Windows. Also use the same modifier shuffle that RealVNC and
TigerVNC uses to get macOS working well.
The fields provided cannot tell us if it is the left or right
version of the key that's pressed, so they are inherently unreliable.
It is also not a huge problem in practice as we'll get in sync on
the next press or release of the modifier.
Use the more modern 'key' field, and remove some legacy fallbacks
that are no longer required. This also removes the "stall" mechanism
as it is not needed with current browsers.
This commit restructures many of the ES6 modules, splitting them
up to actual export multiple functions instead of a single object.
It also splits up Util into multiple sub-modules, to make it easier
to maintain.
Finally, localisation is renamed to localization.
This removes the special comment part of the ES6 module syntax,
opting to enable ES6 module syntax by default.
It also appends `.js` to all import paths to better support in-browser
loading.
It mostly dealt with scrolling which we don't use. It also made mistakes
in some cases. Remove it and compute the coordinates directly in the
calling code.
Mouse wheel event handling has now been standardised and has broad
support. Use this event rather than the older, non-standard ones.
At the same time fix up support for horisontal mouse wheel events.
This commit moves all the input-related files from `core/`
to `core/input/`, and renames a couple as relevant
(input.js --> input/devices.js, keyboard.js --> input/util.js).