"Ctrl" gets stuck when using "notify"

BlitzPlus Forums/BlitzPlus Beginners Area/"Ctrl" gets stuck when using "notify"

marcos jose(Posted 2016) [#1]
Hello!

I need to use the "ctrl" key with other keys.
I'm using "HotKeyEvent" to facilitate, and use along with the menus.

But something goes wrong when I use "notify", "requestfile", among other windows features. The "ctrl" key continues in your event, and you must press again to deactivate.

See the code below:
;
w = CreateWindow("ctrl", 100, 100, 200, 100)

HotKeyEvent 31, 2, $1001, -31
HotKeyEvent 31, 0, $1001, 31
c=CreateLabel("Press 's' or 'ctrl+s'", 10, 10, 180, 20, w)

Repeat

evento = WaitEvent(10)
If evento = $803 Exit
n=n+1
If evento=$1001
If EventData() = 31 c=CreateLabel("Pressed 's'", 10, 10, 180, 20, w)
If EventData() = -31 c=CreateLabel("Pressed 'Ctrl + s'", 10, 10, 180, 20, w) : Notify "ctrl + s"

EndIf
Forever
End
;

When pressed "s", everything is normal.
When pressed "ctrl + s", also works.
But if I press "s" again, the Blitz still understands that "ctrl" is pressed.

I tried to answer the forum, but I did not find anything I could use.

Does anyone know how to fix this?


skidracer(Posted 2016) [#2]
you could try calling the FlushKeys command after calling Notify.


marcos jose(Posted 2016) [#3]
I had already done that.

I Tried:
Flushkeys () and FlushEvents () before and after notify.
Getkey () in the code body. Maybe there was nothing, but I thought I could help!
Create a gadget, activate it, and delete it.
Delete the main window, and re-create it.
I tried a lot, but without success.


RustyKristi(Posted 2016) [#4]
I'm sure this issue has been solved here a bunch of times because it is not that uncommon.

Maybe you can search the archives or forums for 'key combinations'. Try searching with blitz3d since they have almost the same commands, less the 3d part.