[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting mouse in TML Pascal II



limtc wrote:
Nice to know that it help. But reading keyboard seems to be a much
harder task (I need the easy to read solution for my son). This is
what's mentioned in the web:

--
Use the Event Manager's GetKeys() function to get a KeyMap. The key
map
will tell you which keys were pressed at the time GetKeys() was
called.

GetKeys() is documented to return only up to two simultaneous
keypresses,
plus any combination of modifiers. I believe it'll return more,
though, if your
keyboard can detect more, and most keyboards these days can.

Since a key map contains 1 bit for each key, you'll probably still
loop through
the bits individually, but this is very fast compared to calling a
function for each
key.

I'd say it was pretty bad, since you have to loop through the
map to find which key(s) were pressed!

-michael

NadaNet file server for Apple II computers!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."