Enter to newline, Shift+Enter to submit message in chat

Side note: I guess on MacOS Cmd+Enter should work as well for submitting the message if Shift+Enter is configured.

2 Likes

Shift+Enter is standard for adding a newline without submitting a message. It’s probably going to confuse a lot of people if Shift+Enter is used to send messages, because it will train the wrong muscle memory. I always reach for shift+enter when I want to be sure that a program is not going to send the message.

Ctrl/Command+Enter is standard for submitting things (chat messages, emails, etc.). Try both keybindings in Discord, Slack, Gmail, Google Chat, Thunderbird, and most other programs.

Edit: Command+Enter works for Discourse posts too.

There is no standard, that’s why I’m asking to make a setting and be done with it. If I choose Enter to make a newline, I expect anything else to some other action such as Submit.

It is a terrible user experience if Shift+Enter makes a newline while Cmd+Enter submits — these two are very easy to confuse between each other, and we are back to unreliable behaviour which is definitely not the “least surprising”.

It must be between A) an Enter alone, and B) an Enter pressed with a modifier key. This is the only way to distinct between a new line and a submission intention, and that will make user using the editor smooth and intuitive.

Grouping “Enter” together with “Shift-Enter” to produce a newline, and then have “Cmd+Enter” to submit — is a terrible idea imo.

Yes it’s what is noted in the pull request I linked above.

That’s an option, and it will default to enter to send, and shift+enter to linebreak. So I don’t see how that would confuse people, given they would have to CHOOSE this behavior.

2 Likes

I think I will most likely merge the PR as it is now given default behavior is not changing for everyone, and you can all make me feedback as users of this option.

The default sounds good to me, but I wouldn’t make sending on shift+enter an option, because it’s like giving the option to use the ESC to submit things instead of preventing submitting, which will train muscle memory the wrong way in some users.

It’s like ESC to exit or ctrl+k to search — not an official standard, but it’s been done that way for so long by so many programs, that’s what users expect. Like you mentioned above: “This seems to be a pretty standard setting in all popular chats from Telegram to Element – i.e. to allow “Cmd+Enter to send, Enter for newline”.”

If people train muscle memory that shift+enter sends messages, they are going to get unpleasant surprises when they find out what happens in other programs.

I don’t use the two programs you mentioned, but Slack, Google Chat, Skype, Apple Messages, and most others use enter to send and shift+enter to create new lines. When enter doesn’t submit (Gmail, Discourse posts, etc.), ctrl/command+enter submits.

An option to turn off submitting for enter makes sense, but I think using shift+enter to submit is going to cause problems for people who choose that without realizing that it’s going to create another muscle memory problem.

I just merged this, which copies the behavior of telegram:

Let me know how it goes for you.

2 Likes