[Vimperator] ALT mappings and C-[ (on Mac?)

Tim Hammerquist penryu at gmail.com
Wed Jun 25 10:21:24 PDT 2008

Daniel Schaffrath wrote:
> I'd like to have mappings to switch between tabs which use the alt
> modifier and some digit, like <A-1> for moving left, etc. But :map
> <A-1> gt does not work.
> The reasons seems to be that vimperators onKeyPress: function
> (event)  has the digit '1' already somewhat 'cooked' by the alt
> modifier in it  (which renders it to become '¡'). If the mapping was
> meta instead of  alt the digit is not cooked.
> Maybe the vimperator event handler is not "early" enough to get raw
> events? Something similar seems to happen to <C-[> which becomes
> (strange enough) <C-^[> (which is really annoying as the real Escape
> is that far out...)
> Does anyone have a clue if this is a vimperator or FF on Mac issue?

The <C-[> issue turned out to be a FF/Cocoa issue with how keyboard
events are reported.  They seem to have chosen to match the Safari
method, rather than the Firefox method used on other platforms.

The bug is here[1].

I posted a patch for Vimperator to work around this in the thread
titled "PATCH: fix broken <C-[> -> <Esc> mapping in FF3-RC/OSX".  It's
inclusion is pending the resolution of the relevant bug.

I don't use the <Alt> key in Vimperator, and the bug doesn't seem to
mention the Alt/Option key, but it's possible it's related.  The patch
doesn't address this, however.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=432951


More information about the Vimperator mailing list