logoalt Hacker News

jmbwelllast Sunday at 6:03 PM2 repliesview on HN

macOS is slightly more consistent among apps that use system controls, but the more custom the app, or the more React Native or Electron it is, the less predictable it is

Infuriatingly, some apps try to be smart — only one line, return submits; more than one line, return is a new line, and command-return submits; but command-return on just one line beeps an error.

Years of muscle memory are useless, so now I’m reaching for the mouse when I need to be clear about my intent

So much is solved when developers just use the provided UI controls, so much well-studied and carefully implemented behavior comes for free


Replies

sheeptlast Sunday at 10:24 PM

Using provided UI controls is consistent with how today's apps behave on mobile:

- For single-line text fields, pressing enter is an alias for submitting the form. - For multi-line text fields, pressing enter inserts a new line. There is no shortcut for submitting the form.

In mobile chat apps, the enter key inserts a new line, so you have to press the non-keyboard submit button to send a message. In mobile browser address bars, since they are single-line text fields, the enter key becomes a submit button on the virtual keyboard.

show 2 replies
oneeyedpigeonlast Monday at 9:32 AM

> Infuriatingly, some apps try to be smart — only one line, return submits

Tbf, this is almost certainly what the vast majority of people want, most of the time, from chat apps like Slack. It would be much more frustrating to have to click a button after each thought.