Keypress Help

Scott Rossi scott at tactilemedia.com
Mon Apr 18 20:06:10 EDT 2005


Recently, J. Landman Gay  wrote:

>> How can one reliably tell on Windows when a key is pressed versus when it is
>> released?
> 
> Are you sure you don't have your operating systems backwards? ;) In my
> experience, it has always been Mac OS that doesn't generate accurate
> keyUp messages. Windows has always worked for me. That is an OS
> limitation, as Macs send keyup immediately after keydown, regardless of
> the physical state of the key itself. Or at least, that's how it has
> always been in the past.

Thanks for the response Jacque.  But I wonder if you might be thinking about
OS9.  OSX works great for me.

When I run the following simple test stack on MacOS, it works as expected:

  go url "http://www.tactilemedia.com/download/keytracker.rev"

Enable the test button and press one/some keys.  The pressed keys are shown
and [empty] is displayed when nothing is pressed.

When this is run on WindowsXP, I get a mostly empty result, that flickers
between the pressed keys and [empty].  The keysDown function is apparently
not working because it doesn't seem to reliably return the keys that are
pressed (my understanding is the keysDown function was originally designed
to get around this whole key detection problem).

Does this work for you on Windows (or anyone else for that matter)?

Thanks & Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the use-livecode mailing list