philc/vimium — pull request #1275 by mrmr1993 (2014-11-28 05:43:22+00:00)
Title: [WIP] Move key handling to the frontend

This PR begins work on #1274.
* Key handling has been moved to a content script (`content_scripts/key_handling.coffee`).
* Key handling is now done synchronously as part of the event's key handler.
* Checks on whether we handle a key are all done using the same code. This ensures consistency (eg. now we don't pass `0` to the underlying page if we've handled it ourselves as part of a number prefix).

TODO (improvements):
* [ ] Switch from storing the current `keyQueue` as a string of concatenated keys to an array of those keys.
* [ ] Rewrite `checkKeyQueue` to support mappings of arbitrary lengths (similar to #1272).
* [ ] Remove `splitKeyIntoFirstAndSecond`, `validFirstKeys`, `populateValidFirstKeys`, `namedKeyRegex`.

Apart from bugfixes coming from unifying the frontend and backend key handling, this should function the same as before.