
keydown – fires when any key is pressed down, fires first, and always before the browser processes the key (e.g. Here are the three keyboard events supported by all of the major browsers, in the order they are fired: Let’s take a look starting with understanding what keyboard events exist today. The others, who needs them? Not us! Okay, maybe keyup goes on the shelf just in case, but surely keypress can be tossed out. The first bit of practical advice I want to touch on is that keydown is likely the only keyboard event we need. May our future selves spent less time debugging and more time making wonderful experiences for our users.
I hope to provide you (and future me) with solid footing and helpful information. There’s a lot of information out there on browser-based keyboard events, but I couldn’t find practical advice to my questions in a single, coherent post so I thought I’d write some posts on the subject, starting with this one.
Wondering about keyboard events: What they are, when to use them, when to not use? Me too.