3 ms·
Give me an example. Any example beyond this Space one we’re discussing; because I don’t know of any.
by chrismorgan 2mo ago
Give me an example. Any example beyond this Space one we’re discussing; because I don’t know of any.
- youngtaff 2mo agoI can see both viewpoints here and don’t have a strong personal view But for reference browsers fire the keypress event on keyup
- chrismorgan 2mo agoThe keypress event is an ancient mistake that I think never had any legitimate use case, and has been deprecated for quite some time now.
- wky 2mo ago> 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 https://w3c.github.io/uievents/#event-type-keypress
- hnlmorg 2mo agoExamples where key down is used as an input event? Basically anything that requires text input from OS-native text input fields to IDEs, word processors, spreadsheets, web browsers, terminal emulators and so on and so forth.
- chrismorgan 2mo agoKey UP! (I confess I’m getting frustrated at the ridiculously large fraction of messages in this thread that have somehow completely misunderstood things.)
- hnlmorg 2mo agoYour message was ambiguous to me. But I will admit that I was also quite hungover so it’s possible that the error was mine. In answer to your question: I’ve only really used keyup for either one time events (like keyboard shortcuts for UI elements) and for ending the status of repeated events (eg movement in games, dragging UI elements, etc). I think if you were to search for key up events in GitHub, most of references might likely be games and other visual interactions rather than text entry.