Ulrich Rueckert - 2008-01-18

Hi everybody,

first of all, thanks for the great work on Cotvnc, it's an immensely useful piece of software. I stumbled across some issues with cotvnc 2.0b4 on MOSX 10.5.1 and TightVNC server version 1.2.9 on a linux box together with an international (in my case: German) keyboard. As you probably already know, some international keyboards feature an AltGr modifier key, which can be used to input "special characters" such as []{}|\@ that are not available otherwise. This is because those keyboards reassign the corresponding keys on the US keyboard to local characters (such as German umlauts). As I couldn't find a way to enter the AltGr characters on my setup (even the hint at http://fastjack.at/index.php/paralleluniversm/comments/dem_huehnchen_sein_tastaturlayout/ did not work) I started looking into this. Apparently, it is an extremely messy situation (see e.g. http://www.karlrunge.com/x11vnc/#faq-xkbmodtweak\) and there is probably no easy way to fix it completely. Also, it appears to be quite common, see e.g. bugs/feature requests 1867964 and 1651240.

Fortunately, I managed to fix it (to some extent) for my setup. Unfortunately, I don't have the time to pursue this further and come up with a more general working solution. In case this might be interesting to anyone, I provide the modified sources (and a compiled binary) at http://wwwkramer.in.tum.de/rueckert/cotvnc-uli.zip. I changed basically two things:
- The profile manager now features an additional "Alt-Gr" modifier, which can be assigned to the control, option, command or shift key.
- cotvnv now sends the characters without ignoring the modifiers (i.e. I commented out the lines 593 and 594 in EventFilter.m)
This is by no means a "clean" fix. In particular, I only changed the English language NIBs, and the saved prefs are probably incompatible with previous versions. Also, some keys (such as the tilde ~) are entered using two keystrokes on MOSX, but only one on linux. I have no idea how to fix this.

I hope this helps,

Ulrich Rueckert