S
S
Sergey Shilovsky2019-02-07 12:52:30
autohotkey
Sergey Shilovsky, 2019-02-07 12:52:30

How to catch a combination of keys without having to hold them down?

We need to catch the following combination of
Right Down[, Right Up], and give a second to press Left, if Left is pressed within a second, execute the script.
At the same time, do not block the main function of the arrows.
Tried to do this, but it doesn't work:

Right::
Send, {Right} //Чтобы выполнялась основная функция стрелки
Input, UserInput, L1 T0.5, {Left}
if(UserInput = "{Left}")
  MsgBox, "%UserInput%"
return

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xaosxaos2, 2020-10-29
@First_Spectr

Everything will work correctly only if you press the left button, but you forgot that you need to catch the moment of NOT PRESSING the left button, that is, a construction like

if ErrorLevel = Timeout
 {
  MsgBox, "Левая не нажата"
  Return 
 }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question