logoalt Hacker News

youngtafftoday at 9:11 AM2 repliesview on HN

I can see both viewpoints here and don’t have a strong personal view

But for reference browsers fire the keypress event on keyup


Replies

wkytoday at 3:02 PM

> If supported by a user agent, this event MUST be dispatched when a key is pressed down [...]

https://w3c.github.io/uievents/#event-type-keypress

chrismorgantoday at 9:51 AM

The keypress event is an ancient mistake that I think never had any legitimate use case, and has been deprecated for quite some time now.