diff options
| author | Stephen Blott | 2016-10-09 15:20:15 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2016-10-09 15:20:15 +0100 | 
| commit | 6596e30392a1ca053223825eda5cde060394a4aa (patch) | |
| tree | d4320196e034dfa848852a2fe0762a0616d1a225 /lib/keyboard_utils.coffee | |
| parent | 801dd4ea5edfff8b22c3c8c875808ee33e96571e (diff) | |
| download | vimium-6596e30392a1ca053223825eda5cde060394a4aa.tar.bz2 | |
Add translate command for key mappings.
Under *Custom key mappings* (on the options page), this implements:
    translate x y
Whenever the users types `x` in normal mode or in visual mode, the `x`
is replaced by `y`.
For example:
    map รง l
(which apparently would be helpful on Brazilian keyboards).
Issues:
- Do we want yet another hack like this?  This would be documented only on
  the wiki.
- If we allowed `translate <c-c> <c-[>` (and extended `isEscape()` to
  use the translation), then we'd get the `exitMode` command for free
  (#2253).
- Alternatively, instead of adding a new "command" called `translate`,
  we could overload the existing `map` command.  Since these are
  single-key mappings, there's no ambiguity.  (Although, I guess there's
  a risk some user has junk in their key mappings and would be taken by
  surprise).
Inspired by isssue posted by @vhoyer (#2305).
Fixes #2305.
Diffstat (limited to 'lib/keyboard_utils.coffee')
0 files changed, 0 insertions, 0 deletions
