Rebinded key becomes un-changeable
Vegard Øye
vegard_oye at hotmail.com
Fri Aug 12 16:07:58 CEST 2011
On 2011-08-11 21:04 +0200, York Zhao wrote:
> I have this code to inherite most of the ibuffer key bindings while
> still keep the "j" and "k" bindings. ... This works fine however if
> I rebind the <backspace> before the previous code like this:
>
> (define-key evil-normal-state-map (kbd "<backspace>") 'scroll-down)
>
> The <backspace> key would then "fixed" to my binding (scroll-down)
> instead of the ibuffer binding.
This is because the key binding for (kbd "<backspace>") prevents the
<backspace> event from being translated into the ASCII character DEL
(that is, ?\d), which is what ibuffer binds. The immediate solution
is therefore to add a binding for <backspace> instead:
(evil-define-key 'normal
ibuffer-mode-map (kbd "<backspace>") 'ibuffer-unmark-backward)
However, there is a problem: <backspace> bindings aren't recognized
at all when running Emacs in the terminal, where Backspace /is/ DEL.
So Evil should always bind (kbd "DEL") instead of (kbd "<backspace>").
This has been fixed in commit 8fc3c40.
--
Vegard
More information about the implementations-list
mailing list