KEYUP + Shift key
Quote:Original post by Anonymous Poster
I was trying to mock the way every text editor works with holding a key down. I noticed it pauses for a second, and then continues to spam. To do this I set a flag that the key was down and when it was pressed. I only spam the key when it has been down for longer than .5 seconds. I am 100% sure this is a poor way of doing it. I just couldn't think of any other way.
Can't you request the OS to send you repeat keydown events? This is how it is done on a Mac, and it gives you the users keyboard repeat rate settings too (sorry, not familiar with the Windows API).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement