vimxterm

Mapping Alt+umlaut in .vimrc using xterm doesn't work


The following mapping doesn't work:

noremap <A-ö> :do something

I use xterm (on Ubuntu) and mappings like <A-j> work. Mapping ö alone is possible but again, <C-ö> doesn't work.

What I've tried:

Ctrl+v followed by Alt+ö in insertion mode prints ö.

Is there a way to fix this?


Solution

  • This appears impossible because with Ctrl you get the ASCII control characters, which are defined as having a code of X-64, where X is the character you press with control (Ctrl-A is 65 - 64 = 1 = ASCII SOH and so on). But there's no ASCII code for 'Ö' to subtract from.

    There's a similar scheme for Alt, which IIRC, is adding some offset like 128 instead. Mapping Alt-Ö will fail for the same reason.