[comp.sys.mac.programmer] GetKeys Questions

hairston@henry.ece.cmu.edu (David Hairston) (05/18/91)

How does GetKeys determine which index into the KeyMap corresponds
to a virtual keycode?  From what I can tell there is an offset between
the keycodes and KeyMap index (i.e. Shift has keyCode 56 and index 32,
Caps Lock has keyCode 57 and index 33, etc.).  Also, from what I can
tell, the standard KeyMaps are very similar but, for example, could
I count on Caps Lock always being at index 33 in the KeyMap?  Caps
Lock in particular seems to have special 'KMAP' exceptions (which
I understand to correlate to a change in the "state" of ADB keyboards).
Remember, I'm not interested in determing the state of modifiers keys,
that's easy.  I want to know how GetKeys determines its result.

Thanx for any info,

  -dave-  
hairston@henry.ece.cmu.edu