News for hackers. Stuff that matters.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by jrockway on Tuesday September 01, 2020 @09:13PM (#24349031)
You send the key event and THEN start the debounce timer. I think most people tasked with writing a debounce function wait for the key state to change, then start a timer for how long they think the switch will bounce for, check the state after the timer expires, and then send the key event. Obviously, that adds latency. But what you can do instead is send the key event immediately and then completely ignore events during the debounce interval.

There are no comments on this comment yet.