| Age | Commit message (Collapse) | Author |
|
|
|
The tests make more sense in this order.
|
|
This allows any special key to mapped, simply by using the `event.key`
key name. E.g.
map <enter> scrollDown
Replaces #2770.
Fixes #2769.
|
|
This is a workaround for Firefox bug 1408996.
|
|
If
map <c-[> someCommand
is configured, then the hardwired `<c-[>` meaning `Escape` behaviour is disabled.
Users who want to map `<c-[>` probably *never* use it as `Escape`.
Fixes #2722.
|
|
|
|
See this comment:
https://github.com/philc/vimium/pull/2626#issuecomment-326553282.
|
|
|
|
|
|
Fixes #2618.
|
|
|
|
|
|
event.keyCode` is depricated:
- https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
|
|
|
|
|
|
- For PDF tabs, we see keydown events but we don't see the corresponding
keypress events, so this allows us to navigate through PDF tabs with
J/K.
- This relies on using `event.key` instead of `event.keyIdentifier`
(which is no longer supported).
- Also move mapkey handling into the keyboard utils.
The effect of all of this is to simplify and unify much of our key
handling.
Fixes #1243 (for tab commands).
There are known places where we can prune a considerable amount of key
handling code. However, that code is left in place for now in case this
change throws up some unexpected issues.
|
|
1. Remove the use of mapKeyRegistery from the mode handler.
2. Refactor use of mapKeyRegistery keyboard utils.
This is preparatory to refactoring all of the keyboard handling.
|
|
Fixes #2453.
|
|
|
|
|
|
|
|
Here, these map to escape:
translate x <c-[>
translate <c-c> <c-[>
|
|
This reworks the parsing of key sequences like `<c-a-Z>x`:
Advantages over the status quo:
- Parses key sequences in one only place (previously two),
- Removes two hideous regular expression.
- Admits multi-modifier bindings (like `<c-a-Z>`).
- Adds more (and better) tests.
- (And it should be easier to maintain.)
Replaces #2210 (this also simplifies key parsing substantially).
|
|
|
|
|
|
|
|
|
|
Chrome stop using <backspace> to go back, but some still wants this
feature.
This should fix #2207 and #2214.
|
|
see https://github.com/philc/vimium/issues/986#issuecomment-53955175
|
|
See #2147.
Chromium's implementation of event.key currently fails to take account
of keyboard mappings (e.g. neo2).
Here, we favour using event.keyIdentifier (while it's available) as a
workaround.
|
|
This was an oversight from a5262f4e68f62a922c9c05d871c4a874f6737a7b.
|
|
event.keyIdentifier is depricated and will be removed soon. It is being
replaced by event.key. Unfortunatelty, event.key is not yet available
in the stable Chrome version.
Here, we use whichever API is available. In due course, we can remove
the event.keyIdentifier implementation (and a considerable amount of
machinery surrounding it).
For the time being, if both APIs are available, then we verify one
against the other and show a warning message of they do not match. This
should help us track down any issues which arise.
Using event.key has the additional benefit of correctly detecting
shifted characters on the numbers row on keydown, which has been a
problem for some users.
Fixes #2128.
Note: We have a problem with the tests. phantomjs does not currently
support event.key, and possibly never will.
|
|
|
|
Previously, key event parsing was embedded in the normal-mode key
handlers. Here, we move it to a new function (getKeyCharString) in
KeyboardUtils so that it can also be used from elsewhere... In
particular for detecting the pass-next-key key in insertmode.
|
|
See #1906.
It is not obvious that this is in fact correct. In particular, it's not
clear how `Ctrl-[` should work on Mac keyboards.
|
|
Conflicts:
background_scripts/main.coffee
content_scripts/vimium_frontend.coffee
lib/keyboard_utils.coffee
|
|
|
|
|
|
- Better abstraction.
- Add HUD message on yank.
- Require initial selection for visual mode.
- Try to start with a visible selection.
- Scroll the active end of the selection into view (with smooth
scrolling, if enabled).
|
|
|
|
|
|
|