colormaps and keycodes

Dave DeBarr debarr "at"
Thu, 23 Jul 1998 13:54:04 +0000

At 01:52 PM 7/23/98 +0200, Matthias Morche wrote:
>James [Wez] Weatherall wrote:
>> On Wed, 22 Jul 1998, Marty Leisner wrote:
>> > My client is linux, my server
>> > is winnt 4.0pl3 (there doesn't seem to be a version option in the
>> > client) and the server is 3.3.2.
>> >
>> > When I enter "@" (shift-2), I get a 2.
>Does it depend on which of the shift keys You are using? I've made the
>experience, that left shift does work and right shift doesn't... It was
>a little funny, since this prevented me sometimes from logging in :-).
>Even the Alt key worked just after I modified my xmodmap (using
>xkeycaps) from Meta_L to Alt_L.

In my case, I was running WinVNC 3.3.2 on NT with vncviewer 3.3.2 on Solaris.  It seemed like WinVNC was ignoring the right shift key, so I used the Microsoft Visual C++ debugger to check out what was happening.  The right shift key was received from the viewer as "XK_Shift_R" (a good thing); but just before the actual character would be dispatched, WinVNC would set the left shift key to the down state and the right shift key to the up state.  As a temporary fix, I modified the keymap table on the server side.  Since the "SetShiftState(VK_RSHIFT, FALSE);" statement (for NT) renders the right shift key _almost_ useless, I changed line 52 of vncKeymap.cpp from...
	{VK_RSHIFT,		XK_Shift_R},
	{VK_LSHIFT,		XK_Shift_R},

Alternatively, I could fix the problem by using 'xmodmap -e "keysym Shift_R = Shift_L"' on the viewer side.

Dave DeBarr
MITRE; Room S4149, Mail Stop W548
11493 Sunset Hills Road; Reston, VA 20190
Voice (703) 883-6544; Fax (703) 883-3308

The VNC mailing list     -   see