* A.J.Mechelynck <antoine.mechelynck@> [061021 08:01]: > 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. IIRC, only user can tell what will Meta+Key send and it has nothing to do with term*. I'm talking about convert-meta (inputrc) and eightBitInput (xterm).
> but no program can discriminate between different keypresses
> which your keyboard driver translates to the same keycode (or
> keycode sequence).
Vim assumes that Meta+Key always generates (Key | 0x80). Code:
/*
* Try to include modifiers in the key.
* Changes "Shift-a" to 'A', "Alt-A" to 0xc0, etc.
*/
int
extract_modifiers(key, modp)
int key;
int *modp;
{
...
if ((modifiers & MOD_MASK_ALT) && key < 0x80
...
)
{
key |= 0x80;
modifiers &= ~MOD_MASK_ALT; /* remove the META modifier */
}
...
Add extra condition, '8bitmeta' option checking (which is on by
default) for example. However, this will not solve all problems,
I will look further.
P.S. Why am I doing all this? latexsuite plugin imaps <M-x> keys
and this generates problems in ru_RU.KOI8-R locale (8bit). This
can't be fixed without hacking into latexsuite code and this bug
happend only if (x | 0x80) means something in current locale.
One workaround is to switch to UTF-8 locale.
--
Regards,
Sir Raorn.
signature.asc
Description: Digital signature
