4 ms·
Keydowns have the physical button analogue: when you press a physical button, it immediately closes the contact, it doesn't wait until you lift your finger agai
by dkersten 6y ago
Keydowns have the physical button analogue: when you press a physical button, it immediately closes the contact, it doesn't wait until you lift your finger again.
Not saying key down is better than key up, there are certainly arguments for both.
- fiddlerwoaroof 6y agoCan’t physical buttons work either way, depending whether you want to break a normally closed circuit or close a normally open circuit.
- mantap 6y agoImagine a physical button on a car stereo. It activates when you press it, not when you press and release it.
- JdeBP 6y agoYour experience of physical buttons is limited. There are many sorts. To pick an apposite example: The "Pause" button on old tape players used to be press-and-release to change state. Because it was a direct mechanical linkage and not motorized on some players/recorders, this made it possible to perform quite accurate editing with very basic kit: pressing and releasing pause to pause, pressing it again and keeping it held down, and releasing exactly when one desires to un-pause.
- phab 6y agoNow THERE's a rabbit-hole if ever I saw one. Here's an 8-part (!) article [0] on why a physical button is in reality... nowhere near that simple. [0]: https://www.eejournal.com/article/ultimate-guide-to-switch-debounce-part-1/ https://www.eejournal.com/article/ultimate-guide-to-switch-d...