rawKeyStillDown ?

Richmond richmondmathewson at gmail.com
Fri Mar 22 16:41:18 EDT 2013


On 03/22/2013 01:46 PM, Mike Bonner wrote:
> keysdown() works pretty well with some exceptions that are probably due to
> keyboard issues rather than livecode issues. (like some keyboards having
> problems with multiple arrow keypresses at the same time, keysdown doesn't
> always show all the correct keys, yet other keyboards work fine)
>
> But yeah, keysdown works pretty good for game control (again, ignore the
> arrow keys, they're problematic if you need more than 1 read at a time
> and/or if during presses two that disagree are down at just the moment the
> poll hits)
>
>

Maybe I'm being a bit naive . . .

But . . .

a script like this:

on rawKeyDown RAWK
     put RAWK into fld "ff"
end rawKeyDown

and a script like this:

on rawKeyDown
    put keysDown() into fld "ff"
end rawKeyDown

neither seem particularly better than the other as they are fired on a 
keyDown,
and are not repeatedly fired if a key is kept pressed down.

WHAT I need is a way of checking whether a key is down independent of 
the actual action
of it being pressed down - rather as with mouseStillDown a check is sent 
to see if the mouseButton
is depressed independently of the action of it being pressed.

Richmond.




More information about the use-livecode mailing list