However, since I didn't take this into consideration already earlier, I am now looking for a likely hackish solution to avoid having to rewrite code.
Basically I have come up with two possible solutions.
Simplest would be following:
Code: Select all
TextOut(#CENTER, #CENTER, "Press new key for UP")
WaitKeyDown("any")
UP = WaitKeyDownsResult
However, I don't see a way to know what key user pressed, hence the "WaitKeyDownsResult" doesn't exist.
Second solution would be:
Code: Select all
Copy all events to X
Clear All Events
Make Event that checks for key being pressed
WaitEvent()
Handle setting the new key for UP
Events = X
And to clarify a bit.
Reason why I cant just set event handler to wait for keyboard being pressed and then use Waitevent is that there are many other Events happening at same time, which I would first need to turn off to avoid situations where user could do something else than press the keyboard next, and that result in unexpected behavior.