I am trying to detect if the shift key has been held down whilst a GUI button is pressed. In another thread it's stated that EventMods() isn't filled for EVENT_GADGETACTION (my tests suggest this is correct too).
Therefore I chose to set a variable to True when EVENT_KEYDOWN is triggered and EventData() shows shift is pressed, and False for EVENT_KEYUP. Then I can check the state of the variable to know if shift is down whilst a gui button is pressed.
The problem is that 'Case EVENT_KEYDOWN' is never triggered (neither is EVENT_KEYUP). Here's a useless piece of code to demonstrate my point, when launched nothing is printed when keys are pressed:
I hope somebody can help...
Therefore I chose to set a variable to True when EVENT_KEYDOWN is triggered and EventData() shows shift is pressed, and False for EVENT_KEYUP. Then I can check the state of the variable to know if shift is down whilst a gui button is pressed.
The problem is that 'Case EVENT_KEYDOWN' is never triggered (neither is EVENT_KEYUP). Here's a useless piece of code to demonstrate my point, when launched nothing is printed when keys are pressed:
Strict Global win:TGadget = CreateWindow("test",10,10,320,240) Repeat WaitEvent() Select EventID() Case EVENT_KEYDOWN Print "keydown" Case EVENT_KEYUP Print"Keyup" Case EVENT_WINDOWCLOSE End EndSelect Forever
I hope somebody can help...