Multiple key firings
    RM 
    richmondmathewson at gmail.com
       
    Sun Apr 24 10:49:31 EDT 2016
    
    
  
Thanks: after a lot of "cussing and swearing" I came up with this:
on rawKeyDown RKD
    if the keyFiredOnce of this card = "true" then
    switch RKD
    case 65432
       put item 1 of the loc of img "LB" into LB1
       put item 2 of the loc of img "LB" into LB2
       put (LB1 + 50) into LB1
       move img "LB" to LB1, LB2
    break
    case 65430
       put item 1 of the loc of img "LB" into LB1
       put item 2 of the loc of img "LB" into LB2
       put (LB1 - 50) into LB1
       move img "LB" to LB1, LB2
       break
    default
       pass rawKeyDown
end switch
end if
set the keyFiredOnce of this card to "false"
end rawKeyDown
on rawKeyUP RKU
    set the keyFiredOnce of this card to "true"
end rawKeyUP
Richmond.
On 24.04.2016 17:44, Mike Bonner wrote:
> Most likely a repeat rate issue.  If you tap it, does it run once? But held
> down it runs multiple?  You might look at "flushEvents()" and see if it
> helps.
>
> On Sun, Apr 24, 2016 at 8:23 AM, RM <richmondmathewson at gmail.com> wrote:
>
>> I wonder why this:
>>
>> on rawKeyDown RKD
>>     if RKD = 65432 then
>>        put item 1 of the loc of img "LB" into LB1
>>        put item 2 of the loc of img "LB" into LB2
>>        put (LB1 + 50) into LB1
>>        move img "LB" to LB1, LB2
>>        exit rawKeyDown
>>     end if
>> end rawKeyDown
>>
>> does NOT mean that when I press the "6" key on my number pad
>> the "if . . . . end if" only runs once?
>>
>> AND, HOW one might effect that?
>>
>> Richmond.
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
    
    
More information about the use-livecode
mailing list