logoalt Hacker News

okamiuerutoday at 8:12 AM3 repliesview on HN

Can you give some specific examples? In my experience (which I also verified to make sure), all of the things you mention act on keydown. The exceptions are on multi-key combinations, which follow a special key that is held down while modifiers are entered, where the action is completed by releasing this special key (ALT + TAB [...TAB | SHIFT]) being a common example.

TAB is otherwise immediate, as is ESC, and the examples of typing, as well. So I'm left wondering, how do they have it wrong?


Replies

invalidusernam3today at 11:48 AM

Non latin characters are sometimes inputted by holding down a key. For example on my keyboard holding down z shows ź,ž and ż with a corresponding number to select which one I would like to type. I haven't checked but one would assume if you're detecting keydown the input at that time will be z, and keyup would record ž (or whatever was selected).

show 1 reply
wongarsutoday at 8:26 AM

> all of the things you mention act on keydown

Because they listed the exceptions to the "act on keyup" rule

show 1 reply
stavrostoday at 8:48 AM

The GP means that, if you hold space down on a button, you can then tab to another button without activating the first one.