colormaps and keycodes

James [Wez] Weatherall jnw "at" orl.co.uk
Thu, 23 Jul 1998 14:47:26 +0000


On Thu, 23 Jul 1998, Dave DeBarr wrote:

> 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.

What problem does this behaviour cause?

> 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},
> to...
> 	{VK_LSHIFT,		XK_Shift_R},

What difference does this make to WinVNC's behaviour?

By default, WinVNC examines the keycode it is given by the client to see
whether the server side would require the shift key to be up or down to
produce it.  This takes care of awkward keymapping differences with
characters like '@' shifted at one and but unshifted at the other.

So the shift state at the server end shouldn't be expected to match the
shift state at the client end all the time.

James "Wez" Weatherall
--
Olivetti & Oracle Research Laboratory, Cambridge, UK.
Tel : Work - 343000


---------------------------------------------------------------------
The VNC mailing list     -   see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------