aboutsummaryrefslogtreecommitdiffstats
path: root/lib/keyboard_utils.coffee
AgeCommit message (Collapse)Author
2016-09-17Merge branch 'gdh1995-backspace-as-go-back'Stephen Blott
2016-09-17Rework #2223 (backspace).Stephen Blott
2016-09-17use keyNames to check backspace keyCodegdh1995
2016-09-10simpler logic to detect backsapcegdh1995
2016-08-18support mapping <backspace>gdh1995
Chrome stop using <backspace> to go back, but some still wants this feature. This should fix #2207 and #2214.
2016-08-10Consider the alt-key status when trying to detect <c-[>Colin Kiegel
see https://github.com/philc/vimium/issues/986#issuecomment-53955175
2016-06-02Favour event.keyIdentifier over event.key.Stephen Blott
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.
2016-05-15Also remove event.keyIdentifier in getKeyCharString().Stephen Blott
This was an oversight from a5262f4e68f62a922c9c05d871c4a874f6737a7b.
2016-05-15Use event.key (not event.keyIdentifier).Stephen Blott
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.
2016-02-18PassNextKey; minor tweak.Stephen Blott
2016-02-18PassNextKey; move key parsing to keyboard_utils.coffee.Stephen Blott
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.
2015-12-04For Ctrl-[, also require NOT AltStephen Blott
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.
2015-02-09Merge branch 'visual-and-edit-modes'Stephen Blott
Conflicts: background_scripts/main.coffee content_scripts/vimium_frontend.coffee lib/keyboard_utils.coffee
2015-02-01Give find mode a history.Stephen Blott
2015-01-29Visual/edit modes: initial caret mode.Stephen Blott
2015-01-22Visual/edit modes: further development.Stephen Blott
- 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).
2015-01-10Modes; better printable detection, move to keyboard_utils.Stephen Blott
2014-04-23Recognise <ctrl> key in LinkHintsmrmr1993
2012-06-12Port keyboard_utils.js to coffeescriptPhil Crosby