Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CTRL + ENTER to insert new lines #11322

Closed
jooola opened this issue Nov 5, 2019 · 6 comments
Closed

Use CTRL + ENTER to insert new lines #11322

jooola opened this issue Nov 5, 2019 · 6 comments

Comments

@jooola
Copy link

jooola commented Nov 5, 2019

The common way of adding a new line in a message has been to hit CTRL + ENTER. This behavior can be seen in Telegram, Slack, Mattermost, and many others.

Some apps also allowed to invert the behavior if user would like to. Meaning that newline is inserted by hitting ENTER, and message is only send when hitting CTRL + ENTER.

My request is to follow this common pattern. I just found out that I could insert new lines by hitting SHIFT + ENTER, since I always though if this behavior were implemented it would be bound to the CTRL+ENTER combo.

Also It would be nice to allow users to configure the send message behavior described previously.

@t3chguy
Copy link
Member

t3chguy commented Nov 5, 2019

Ctrl Enter is non-standard,

typically it is

Shift Enter new line
Control Enter confirm/send
Enter is one of the above.

Related to #5006

@jryans jryans added the A-Shortcuts Keyboard shortcuts label Apr 27, 2020
@skolmer
Copy link

skolmer commented Nov 16, 2020

I'm on Windows and CTRL+Enter is the standard to add new lines in messengers like Telegram, Skype, Teams and Slack. Not sure about other Systems though. If you are used to this behavior and press those keys in element, the message is send directly.

@t3chguy
Copy link
Member

t3chguy commented Nov 16, 2020

@skolmer
Copy link

skolmer commented Nov 17, 2020

That's interesting, I tested it and Shift+Enter is working indeed. I'm using Ctrl+Enter in Slack for years now, wasn't aware that Shift+Enter is working too. I searched through my Slack settings but the only setting I could find was to reassign the shortcut.
image

@skolmer
Copy link

skolmer commented Nov 17, 2020

I also tested Shift+Enter in Skype and Telegram and it works too. It seems both are the standard!? 🙃
The only explanation I have right now is that it has changed at some time because people like me were always confused when Ctrl+Enter in a Webform, like on GitHub, directly submitted the comment.
Should both be supported like in those other messengers? Definitely needs some research!
We might at least agree that Ctrl+Enter should never submit a message if it is not explicitly set by a setting as described in #5006.
I'm definitly using Shift+Enter from now on everywhere because it is working on GitHub too 😁

@t3chguy
Copy link
Member

t3chguy commented Feb 21, 2022

Element now has a preference between Enter's functionality of Send vs Newline, for further changes closing in favour of #15076

@t3chguy t3chguy closed this as completed Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants