KeyDown/Press Issue - Help Needed ASAP

Scott Rossi scott at tactilemedia.com
Sun Apr 10 16:03:53 EDT 2005


Howdy List:

Got a user test happening tomorrow and ran up against an issue on Windows XP
where pressed keys cannot be reliably detected and am looking (praying) for
a workaround.

Have been trying to use the keysDown function to tell when keys are pressed,
versus not pressed (default behavior on Windows seems to be keyUp is
immediately sent after keyDown, regardless of whether key has been
released).  Even when used within a repeating handler set to 8 milliseconds
below, pressed keys are not reliably detected (empty is often returned even
while key is held down):

[button script]

on mouseUp
  set hilite of me to not the hilite of me
  if the hilite of me then
    set the allowKeyTrack of me to true
    trackKeys
  else set the allowKeyTrack of me to false
end mouseUp


on trackKeys
  if not the allowKeyTrack of me then exit trackKeys
  send "trackKeys" to me in 8 millisecs
  get keysDown()
  if it <> "" then
    put it into fld 1
  else put "" into fld 1
end trackKeys


Can anyone see if this works differently for you?  If not, any ideas for a
workaround?  Tired and under then gun over here...

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