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

FR: Ctrl+Enter to send a message #93

Open
JohnVeness opened this issue Jun 4, 2024 · 3 comments
Open

FR: Ctrl+Enter to send a message #93

JohnVeness opened this issue Jun 4, 2024 · 3 comments

Comments

@JohnVeness
Copy link
Contributor

In many other websites and apps (including here on GitHub), pressing Ctrl+Enter will submit the current form. Can this feature be added to Freegle too?

I realise this will only make sense if the setting "What the enter key does" is set to "Inserts new line". (An aside: Personally, I think that should be the default. I'm quite often chatting with new users who get caught out by the default setting being to send the message, and have to point them at the setting.)

@edwh
Copy link
Member

edwh commented Jun 5, 2024

I'm not sure about Ctrl+Enter. It seems to be an area where there isn't consensus, e.g.:

https://ux.stackexchange.com/questions/4136/usability-of-ctrl-enter-submitting-of-forms
https://meta.stackoverflow.com/questions/381745/ctrlenter-to-submit-post
https://answers.microsoft.com/en-us/outlook_com/forum/all/how-do-i-avoid-accidentally-sending-an-e-mail-with/107e9cab-ceeb-40a6-9051-398f398946fc

It only applies to people on devices with physical keyboards, and I need to focus mostly on mobile/tablets nowadays, as that is the majority, and increasingly so.

But you might be able to find some authoritative UX article which explains why this is a good idea and works on Macs too?

The "enter inserts new line" question is very complex. Very briefly, people who use mostly desktops/laptops prefer enter as newline, and people who use mostly phones prefer enter as send. Most people use mostly phones and therefore this is a better default for most people.

But there is a bigger consideration than this to do with how on screen keyboards look on different devices, because they present keys that look visually as though they will send. That means that if you default to enter as new line, then many mobile users will have the experience of feeling they have to click twice to send something (at best) and failing to send messages they thought they'd sent (at worst).

This is a killer reason why this is the best default, though of course people who prefer it the other way around will still want the default to be that way round. It might be possible to handle that better with a native app (rather than what we currently have) but for now this is the best default - it reduces confusion, though it may increase mild annoyance.

@JohnVeness
Copy link
Contributor Author

Thanks, as always, for the considered reply.

I don't have any research to point to, just personal experience that most messaging apps I use seem to allow Ctrl+Enter to send, either as a default, or (in Thunderbird) the first time you press Ctrl+Enter while writing a message it will ask if you want to send the message, with a tickbox to make this the default for Ctrl+Enter in the future.

Regarding Enter as newline vs Enter as send (I really should have made this a separate issue), I've checked a couple of on-screen keyboards here and interestingly they both show a different icon for the Enter button depending on whether the Freegle setting is set to Enter as newline or Enter as send. I don't know if this is universal with different OSKs though.

@edwh
Copy link
Member

edwh commented Jun 5, 2024

There's an attribute you can use to hint whether enter is send or newline, which we set:

https://caniuse.com/?search=enterkeyhint

This will affect on screen keyboards, but it's not universally supported yet on some of the older mobiles.

You could of course have a crack at implementing Ctrl+Alt+Enter :). ChatFooter.vue would be the place to make the change for chat, and it doesn't look too tricky - though it would then be good to test it on a set of real mobile devices. We have Browserstack for that, and I'd happily give you a login.

tdobson added a commit to tdobson/iznik-nuxt3 that referenced this issue Jun 26, 2024
…ding messages in ChatFooter component with ctrl-alt-enter.
tdobson added a commit to tdobson/iznik-nuxt3 that referenced this issue Jun 26, 2024
tdobson added a commit to tdobson/iznik-nuxt3 that referenced this issue Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants