[comp.sys.mac.programmer] peeking deep into the keyboard...

fleabag@athena.mit.edu (jeff bellsey) (12/07/90)

is there a better way to get the state of the keyboard than using
keyUp and keyDown events?  i need to know whether certain keys are
down and when they come up, but sometimes the events don't post
fast enough.  where are the bits that i can watch?  they must be
in there somewhere...

thanks for any help,
:jeff
fleabag@athena.mit.edu

darweesh@zephyrus.crd.ge.com (Michael Darweesh) (12/07/90)

The procedure you want to learn about is:
PROCEDURE GetKeys (VAR theKeys:KeyMap);

KeyMap is basically and array of Bits that represent the current keboard
state. Your favorite Mac programming reference should be able to describe
this who idea in more detail.
It should be located in the chapter that discusses "The Toolbox Event Manager"
in Inside Macintosh. I use "SpInside Macintosh", so I can't help you with
page numbers.

-Mike Darweesh
weesh@crd.ge.com