Mac VNCViewer

Charlie McLachlan cim "at" orl.co.uk
Fri, 16 Oct 1998 18:01:33 +0000


On Fri, 16 Oct 1998, Mike Babulic wrote:

> Could the VNC client be looking directly at the keyboard instead of using
> the event loop? (bad, bad program!)

It depends on what you mean. Keyboard EventRecords have two fields, a
charCode and a virtCode. The virtCode is the one you shouldn't look
at (it corresponds to a hardware defined key). The charCode is the
virtCode after being put through the KCHR mechanism. But the trouble is
some keys (like the F buttons) all return the same charCode, so the viewer
has to look at the virtCode in some circumstances.

The problem with alt+whatever keycodes is this. If you want # you press
alt+3 which arrives at the viewer as an EventRecord with alt down and a
charCode equal to #. But the Xserver is just expecting a # so the viewer
has to send an alt up + # down + alt down. The viewer needs to know
exactly which charCodes are the result of alt + key presses and which ones
aren't. This can be done by reverse engineering the KCHR resources. (which
is a BAD THING, but is the only way to work this sort of thing out)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Charlie McLachlan - Responsible for VNC on the Mac
	ORL
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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