Re: Trapping multiple keystrokes

2017-12-01 Thread J. Landman Gay via use-livecode
It's a function, so try get flushEvents("autoKey") -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On December 1, 2017 4:05:20 PM Kaveh Bazargan via use-livecode wrote: Hi Paul It looks like just what I ne

Re: Trapping multiple keystrokes

2017-12-01 Thread Kaveh Bazargan via use-livecode
Hi Paul It looks like just what I need and thanks for that, but it does not do the job in my stack and in the single field stack with one line added: on arrowKey theKey put 1 into increment put me into current_value if theKey is "up" then put current_value + increment into the tar

Re: Trapping multiple keystrokes

2017-12-01 Thread Paul Dupuis via use-livecode
On 12/1/2017 1:00 PM, Paul Dupuis via use-livecode wrote: > On 12/1/2017 12:52 PM, Kaveh Bazargan via use-livecode wrote: >> I have a field with a number in it. when focused, I want the value to go up >> and down with the up/down arrow keys. The trouble is that if I keep the key >> down, it traps m

Re: Trapping multiple keystrokes

2017-12-01 Thread Kaveh Bazargan via use-livecode
On 1 December 2017 at 21:29, J. Landman Gay via use-livecode < use-livecode@lists.runrev.com> wrote: > On 12/1/17 3:16 PM, Kaveh Bazargan via use-livecode wrote: > >> It is the final action I have a problem with, as dozens of arrow key >> actions are held in the buffer. The number keeps increasing

Re: Trapping multiple keystrokes

2017-12-01 Thread J. Landman Gay via use-livecode
On 12/1/17 3:16 PM, Kaveh Bazargan via use-livecode wrote: It is the final action I have a problem with, as dozens of arrow key actions are held in the buffer. The number keeps increasing or decreasing and background actions are triggered. Here is a minimal version of the handler I have: on arr

Re: Trapping multiple keystrokes

2017-12-01 Thread dunbarx via use-livecode
If you have this in the script of a field: on arrowKey tKey add 1 to me end arrowKey The continuous addition stops instantly after release. As Jacque mentioned, how are you doing it? Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html __

Re: Trapping multiple keystrokes

2017-12-01 Thread J. Landman Gay via use-livecode
My understanding of the question is that keydown messages are being queued and continue to run to exhaustion even after the key is no longer pressed. I couldn't duplicate that behavior. The rawkeydown handler below will manage keypresses but won't solve a backed-up message queue. That's why I

Re: Trapping multiple keystrokes

2017-12-01 Thread Kaveh Bazargan via use-livecode
Thanks for the replies guys. Richmond, sorry I was not clear. It is simpler: - I click in a field that has a value - I press arrow key (up or down) - I want the value to change up or down in that field - After the value is changed, other actions are triggered, e.g. setting th

Re: Trapping multiple keystrokes

2017-12-01 Thread Mike Bonner via use-livecode
If you're using rawkeydown you can check to see if the key is actually still down before doing any processing.. on rawkeydown pKey -- since you're checking specifically for arrow keys, you can use pkey as the first part of the filter.. if pkey is among the items of "65361,65362,65363,65364"

Re: Trapping multiple keystrokes

2017-12-01 Thread Richmond Mathewson via use-livecode
I may be a bit stupid, but as far as I understand you are trying to do this: 1. You keep an arrow key pressed down, 2. You do other things with other keys while the arrow key is pressed down. I cannot begin to try to answer your question until you either confirm what I have written or say that

Re: Trapping multiple keystrokes

2017-12-01 Thread J. Landman Gay via use-livecode
On 12/1/17 11:52 AM, Kaveh Bazargan via use-livecode wrote: I have a field with a number in it. when focused, I want the value to go up and down with the up/down arrow keys. The trouble is that if I keep the key down, it traps multiple keydown messages that continue after the key is released. Ho

Re: Trapping multiple keystrokes

2017-12-01 Thread Paul Dupuis via use-livecode
On 12/1/2017 12:52 PM, Kaveh Bazargan via use-livecode wrote: > I have a field with a number in it. when focused, I want the value to go up > and down with the up/down arrow keys. The trouble is that if I keep the key > down, it traps multiple keydown messages that continue after the key is > relea