keydown weirdness

Thomas McGrath III mcgrath3 at mac.com
Tue Feb 26 11:38:16 EST 2013


Has anyone ever experienced this type of weirdness with keyDown trapping?

I have this script in a substack of my main stack that should speak all characters typed into this field:

on keyDown pKey
     if charToNum(pKey) = 32 then
          TASpeak "Space."
          TASpeak field "SignIn" of this stack
     else
          TASpeak pKey
     end if
        pass keyDown
end keyDown


Later in a separate main stack:

on TASpeak pTextToSpeak
     if gNoSpeech then
          -- speech mode off
     else
          -- process Rate, Pitch etc.
          revSpeak pTextToSpeak
          wait until revIsSpeaking() is false with messages
     end if
end TASpeak

Now, If I type "Tom M" into the field slowly I get: Tom M 
and it speaks each char 
and then on entering a space it speaks the whole field

BUT, (here's the weirdness) If I type very fast I get: M moT
and it speaks it in that order

This is just absolutely weird. Has anyone else seen this?

Tom

-- Tom McGrath III
http://lazyriver.on-rev.com
mcgrath3 at mac.com




More information about the use-livecode mailing list