Can't get AltGr to work

Johan Parin johan.parin "at" ericsson.com
Fri Jun 29 13:06:01 2007


Hi all,

I'm running a VNC server on a Linux box and a VNC viewer on my Windows 
machine (running Win2K). Both sides are using Free/Personal Edition 4.1.2.

The AltGr key does not work properly when running through VNC. What 
happens apparantly is that the AltGr key generates two key events, 
Control_L and Alt_R (this can be seen when by running xev). When using 
the same type of keyboard (a Swedish PC keyboard) directly connected to 
the Linux box,  the keysym ISO_Level3_Shift is generated instead.

What happens when running through VNC is that AltGr works to some 
degree, but there seems to be some extra garbage generated at the end. 
For instance, in vi, when typing AltGr + 7 (which should generate {), a 
{ is generated but then insert mode is left, as if escape had been 
typed. This behavior is extremely frustrating.

I have tried to make another key the AltGr key by mapping keycodes 
generated by the windows and menu keys to ISO_Level3_Shift, but i havent 
been able to get this to work.

Any suggestions on how to solve this problem?


Thanks,
Johan