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

incorrect behaviour send key in Signal app #1037

Closed
ghost opened this issue Jun 21, 2021 · 5 comments · Fixed by #1822
Closed

incorrect behaviour send key in Signal app #1037

ghost opened this issue Jun 21, 2021 · 5 comments · Fixed by #1822
Labels
area: kbd-logic Issues with the keyboard backend (logic, crashes, etc.) bug A bug report bug-confirmed A confirmed and reproducible bug report

Comments

@ghost
Copy link

ghost commented Jun 21, 2021

Short description

Shift + send key does not create new line in Signal app, instead it sends the message. Similar to
#33
Have not noticed issue in other apps

Steps to reproduce

  1. Open Signal app and click message box to compose message
  2. Press shift key + send key
  3. See error

Environment information

  • FlorisBoard Version: 0.3.12
  • Install Source: GitHub
  • Device: Pixel 4a 5G
  • Android: GrapheneOS (Android 11)
@ghost ghost added the bug A bug report label Jun 21, 2021
@ghost ghost changed the title incorrect behaviour send key in Signal all incorrect behaviour send key in Signal app Jun 21, 2021
@Glitchy-Tozier
Copy link
Collaborator

For that to happen you have to set some Signal-option to send on Enter, right?

With the default seittings, i couldn't reproduce.

@ghost
Copy link
Author

ghost commented Jun 22, 2021

Yes you are right. I have the option "Enter key sends" enabled, but with every other keyboard app I could still use "shift" + "Enter" to insert a new line. It's just Florisboard that responds to the setting by changing the key entirely - it even has a different icon (a "send" icon I presume).

Ideally the "Enter" key should send (per the setting) and "shift" + "Enter" should be new line? This is the behaviour across different apps, as mentioned in the other issue I linked to?

@patrickgold
Copy link
Member

Thanks for your bug report! I just tried this bug out and it is indeed reproducible, although many keyboard behave "incorrect" and sends the message with shift+enter on my phone. (Tested with Gboard, SwiftKey, Hacker's Keyboard). OpenBoard and AnySoftKeyboard do work though, so I guess that many keyboards (including FlorisBoard) just react incorrectly to the requested parameters. I am not entirely sure why though, because afaik FlorisBoard propagates the shift press to the target app. Will have to investigate into this.

@patrickgold patrickgold added area: kbd-logic Issues with the keyboard backend (logic, crashes, etc.) bug-confirmed A confirmed and reproducible bug report labels Jun 25, 2021
@henk717
Copy link

henk717 commented Nov 28, 2021

Thanks for your bug report! I just tried this bug out and it is indeed reproducible, although many keyboard behave "incorrect" and sends the message with shift+enter on my phone. (Tested with Gboard, SwiftKey, Hacker's Keyboard). OpenBoard and AnySoftKeyboard do work though, so I guess that many keyboards (including FlorisBoard) just react incorrectly to the requested parameters. I am not entirely sure why though, because afaik FlorisBoard propagates the shift press to the target app. Will have to investigate into this.

I am also running into this on KoboldAI which uses a web interface that you can access with your phone, in that case its the webbrowser interpreting the input, not an app.

Behavior is consistent with the use of the enter key, however in many different programs the behavior of a shift + enter is different. For example in many word processors you get less spacing with a shift + enter than with enter. The Office app is another one where this behavior is very apparent in word document editing mode.

So what you will most likely change to change is what the app ends up sending when you hit enter since to my knowledge it will be a different keyboard input with shift + enter than just enter. Your app seems to be always sending enter instead of shift + enter.

@patrickgold
Copy link
Member

Above PR is a major rework of the input logic and with the latest linked commit the enter key now respects the shift key state. Note though that the target app must cooperate, else this won't work.

In detail the target app must behave the following so this shift+enter thing works:

  • "Enter key sends" is disabled in target app:
    • action MUST NOT be set and flagTextMultiline must be set
  • "Enter key sends" is enabled in target app:
    • action MUST be set to something valid and flagTextMultiline must be set

If flagTextMultiline is not set, FlorisBoard assumes that the target editor is single line and will either execute a set action or perform a raw enter, if action is unset, as normal.

This means that for Signal this works really well now, but Element for instance acts up and removes the multi-line flag if this option is enabled, so then it does not work correctly.

This will be released in 0.3.16-beta01, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: kbd-logic Issues with the keyboard backend (logic, crashes, etc.) bug A bug report bug-confirmed A confirmed and reproducible bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants