Alexey I. Froloff wrote:
* Bram Moolenaar <Bram@> [061020 23:04]:
Read again: Vim _assumes_ the Alt key sets the 8th bit.
What about GVim?

When Bram talks about Vim without specifying Console or GUI version, he means all of them unless the opposite is obvious from the context.


If this doesn't happen, then you need to map the character that
is produced instead of <M-x>.
So, <M-x> is a shortcut for (x | 0x80)?  This is not right.  Not
_always_ right.  In general, this is wrong for all non-ascii
8-bit locales, Vim expectations is quite outdated...

Vim can't know what key is actually pressed when some character
with the 8th bit set arrives,
Well, I am talking about _giving_ Vim this way.  Will <M-x> be
shortcut to (x | 0x80) or <Esc>x.

I'll take a look in code and try to make this configurable.


IMHO, the way to configure it is not by hacking Vim but (at least in console Vim) by having a properly-built termcap/terminfo which tells Vim which codes correspond to which keys. The GUI is somewhat "cleverer" than the console version (including, on Unix, cleverer than a GUI-enabled build running in console mode) when it comes to reading your keyboard, but no program can discriminate between different keypresses which your keyboard driver translates to the same keycode (or keycode sequence).


Regards,
Tony.

Reply via email to