DreymaR / BigBagKbdTrixPKL

"DreymaR's Big Bag of Keyboard Tricks" for Windows with EPKL
Other
326 stars 32 forks source link

Send keys directly, remove buffer and timer #56

Closed ProfXwing closed 1 year ago

ProfXwing commented 1 year ago

Currently, a KeyDown event is able to send after the key is released due to timing issues. This can lead to keys "sticking" when playing games or elsewhere. The solution is to purge the buffer, which I have done.

Additionally, the buffer is not working correctly. The buffer array gets "reset" every time a user presses a key, so I went ahead and fixed that as well. Hope this helps!

EDIT: Nevermind, purging the buffer is a bad idea, theoretically. If a timer is used on KeyDown, a timer should be used on KeyUp. After some testing, it seems like the timer is not needed at all for either, though, so I removed it.

DreymaR commented 1 year ago

Sorry about the force-push and whatnot, I'm afraid that's a bit typical me...

My latest commit tries to make a little more order in the functions and variables used. Please work from that?