pheromonez, I could kiss you (in a strictly friendly way of course)
Your solution works like a charm.
I solved all my problems with stuck keys by just making a small UnstickKeys function which I put at the end of every function I call using hotkeys. Problem solved!
$dll = DllOpen("C:\Windows\System32\user32.dll")
Global Const $keys[8] = [0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x5b, 0x5c]
;0xa0 LSHIFT
;0xa1 RSHIFT
;0xa2 LCTRL
;0xa3 RCTRL
;0xa4 LALT
;0xa5 RALT
;0x5b LWIN
;0x5c RWIN
Func UnstickKeys()
For $vkvalue in $keys
DllCall($dll,"int","keybd_event","int",$vkvalue,"int",0,"long",2,"long",0) ;Release each key
Next
EndFunc
Thank you so much!