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.
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.