Caps lock

James [Wez] Weatherall jnw "at" orl.co.uk
Sun, 29 Mar 1998 15:12:56 +0000


On Fri, 27 Mar 1998, Dr. Joel M. Hoffman wrote:

> I use caps lock for control (and I've become VERY used to this.)  I
> tried using xmodmap in an xterm running under Linux (Xvnc) and viewed
> under Win95 (vncviewer) to make Caps_Lock into Control, the way I do
> from the console, and it almost works.  I can use Caps_Lock as
> control, but it >also< invokes caps lock.
> 
> Is this a Win95 bug?  Is there any way around it?  Two work-arounds

The problem is in the keyboard handling at the two ends.  To be consistent
with all potential viewer-end keyboards, it should _always_ be the viewer
end of a VNC session that does any keyboard mapping.  The server end
doesn't know enough about the keyboard that the client is using to
sensibly perform the required mappings, in this case of caps-lock to
control.

In this case, the Windows machine is performing caps-lock handling
locally, at the viewer end and is then sending the XK_CAPS events to the
server end, where they are re-mapped into XK_CONTROL events.  The result
is that the Windows machine then maps all lower case letters into
uppercase before sending them to the server, so even though the server
doesn't think it's in caps-lock, it actually is.

If you want to remap caps-lock to control, you really aught to do it at
the client end, for consistency, if possible.

Cheers,

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