Rocket.Chat.ReactNative
Rocket.Chat.ReactNative copied to clipboard
Option to send or to make a new line when pressing the enter key in the virtual/hardware keyboard
The app could have an option to send on enter or create new line when using the enter key.
By default, IMHO, it should respect the settings we have in our profile (I've set in to send via web interface).
@TheMythPT Nice!
@TheMythPT if he chooses send on enter how will he make a new line if he wants (on Android especially), I tried but couldn't do it
The idea is the following:
- The app should use the default set on browser and, iirc, the default is to send on Enter.
- The option on the app would override the web settings, so basically the behaviour inside the app would differ from the browser behaviour.
@TheMythPT How would the user add a new line? Do you have an example app that does it? Twitter, Facebook, etc?
Like I've said above
- If the
Send on Enteris enabled, there's no option to add a newline. - If
Send on Enteris disabled, current behaviour is used.
All the other apps I've tried behave like this, basically.
@TheMythPT I've tried Slack, WhatsApp, Twitter and Discord. None of them have this behaviour.
Makes sense, although those apps are really a bit crappy without almost any possible customisation.
Check here
@TheMythPT An example! Now we're talking :)
@TheMythPT An example! Now we're talking :)
Usually I don't outsource my sources. I like people to think that was my idea 😋
@diegolmello also, your WhatsApp must be very outdated! :stuck_out_tongue_closed_eyes:
@TheMythPT My WhatsApp is updated on iOS and I don't have this feature, but it's nice to know it exists!
@diegolmello, you should already know that good stuff is just available to Android users! 😝
Just a quick +1 for this feature, I use an iPad with magic keyboard a lot and it's frustrating that there is no keyboard only way of sending a message. Return, Shift+return and alt+return all do the same thing so it'd be nice of one those could be repurposed
Agreed, and I'd like to add that I can't even tap the send button without moving the iPadOS keyboard controls out of the way first, for every single message. There really should be a way to send via keyboard, like Option-Return or Cmd-Return.

@maiksd How can I reproduce that? I was not able to open those keyboard controls on top of send button.
@diegolmello On an iPad running iPadOS 15 with a keyboard attached, in iPadOS Settings -> General -> Keyboard, activate "Shortcuts", but keep "Predictive" off. That will prevent the bottom entry field to be raised up, and the shortcuts controls end up covering the send button.
That's an OS thing and you can move it around.
https://user-images.githubusercontent.com/804994/177596867-462310a9-34cc-4767-8dd0-c893893c7493.mp4
Sure you can, and you must to send a message. But it will reappear in the lower right corner again and again anyway, so that's not a solution.
But it will reappear in the lower right corner again and again anyway, so that's not a solution.
No, it's going to appear wherever you placed for the last time.
Anyway, you can just turn that off by disabling shortcuts and predictive. You don't want to show it.
Sure, I can deal with it by moving it around or using iOS settings that I don't want to use. Disabling shortcuts loses me the ability to invoke dictation, for example.
Why not improve the application and do it like e.g. Slack does it (return defaults to send, option-return for new line)?
I was just trying to help you use the app. This issue is open yet because we're looking for contributors and this is a wanted feature. Are you willing to contribute?
I am, but I lack the required skillset I'm afraid. If you need some Java backend programming, contact me...
We would need something like this lib to support enter and shift+enter functionality coming from a hardware keyboard
https://github.com/emilioicai/react-native-hw-keyboard-event