logoalt Hacker News

chrismorgantoday at 7:06 AM2 repliesview on HN

(Esc while Space is held doesn’t cancel, but Tab does.)

You’re only answering half of the inconsistency: because Enter activates buttons like any other key, on keydown.


Replies

Rygiantoday at 2:08 PM

While spacebar is depressed:

Qt: Esc cancels. Tab cancels.

Gtk-4: Spacebar auto-clicks before keyup (probably due to auto-repeat).

Win32: Esc sends Esc to the window. Tab cancels.

Firefox: Esc does nothing. Tab cancels.

So, mileage does vary.

Re. Enter key, that's a different key, so different discussion.

show 1 reply
b112today at 8:55 AM

Just diving in without full context, but, enter is often a completion action. Historically often a full carriage return. It often means "submit data".

So this could be the oddity