Hi Bob, > Am 24.03.2022 um 22:26 schrieb Bob Sneidar via use-livecode > <use-livecode@lists.runrev.com>: > > I have also run into this. I use rawKeyDown though, that always seems to > work. Have you tried rawKeyUp?
no, since keydown does work, but I will keep this in mind, thank you! > Bob S > > >> On Mar 24, 2022, at 13:58 , Klaus major-k via use-livecode >> <use-livecode@lists.runrev.com> wrote: >> >> Hi, >> >> I have this in the card script to provide some shortcuts to a player object: >> ---------------------------------- >> on keyup tKey >> >> ## Have been bitten by this in the past :-D >> if the selectedfield <> EMPTY then >> pass keyup >> end if >> switch tKey >> >> ## This ALWAYS works: >> case SPACE >> set the paused of player 1 to NOT (the paused of player 1) >> check_time >> break >> >> ## This only works about one out of ten times? >> case "r" >> set the currenttime of player 1 to 0 >> check_time >> break >> default >> pass keyup >> break >> end switch >> end keyup >> --------------------------------------- >> So I added this as a workaround: >> ------------------------------------- >> on keydown tKey >> if the selectedfield <> EMPTY then >> pass keydown >> end if >> switch tKey >> >> ## This ALWAYS works! >> case "r" >> set the currenttime of player 1 to 0 >> check_time >> break >> default >> pass keydown >> break >> end switch >> end keydown >> -------------------------------------- >> Any idea why KEYUP does not work as exspected? Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass kl...@major-k.de _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode