Julow / Unexpected-Keyboard

A lightweight virtual keyboard for developers.
GNU General Public License v3.0
1.58k stars 196 forks source link

wrong return key #12

Closed rambip closed 2 years ago

rambip commented 2 years ago

I suspect there are multiple different return keys on an android device, and the one on your keyboard is not the same as the one on the standard g-board.

For example, when I press the return key on gboard when I use discord, it creates a new line. When I use your keyboad, it sends the message, which quite inconvenient. Is this behaviour easy to fix ?

marcdw1289 commented 2 years ago

That's actually old standard behavior, especially with messaging apps. First off, GBoard is not a standard Android keyboard but a Google enhanced product.

Anyway, with basic Android keyboards and various messaging apps, pressing Return key will send by default. In some cases if one presses "Shift + Enter" key it would do a newline. Not sure about Unexpected Keyboard.

Check to see if your messaging app has an option for handling the Return key. Some do. Also in your ROM's settings under Languages & Input. Way back when there were even Xposed modules to deal with this behavior.

Julow commented 2 years ago

Hi! As @marcdw1289 said, this is the expected behavior. Shift + Enter should insert a newline in most apps where Enter would do something else.

It is not excluded however that Unexpected Keyboard can detect the kind of application it is connected to and changes its behavior. (perhaps with an option) Contributions welcome :)

rambip commented 2 years ago

Ok now I understand It wouldbe nice to have a way to send "maj + return" by sliding on the return key (the same way as tab)

Julow commented 2 years ago

I'm not fan of adding a new key that is just a shortcut for a combination. Is it too slow to tap or hold the shift key then to tap the enter key ?

rambip commented 2 years ago

You're right, I think I will get used to it. Again, it is just a matter of knowing how your device work !

I rememeber that I already noticed that behaviour when using a bluetooth keyboard.

Out of curiosity, how could I go about creating a new layout ? It would be nice if it could be installed with F-droid.

(apart from that you can close the issue, except if you consider it should be added to the documentation

Julow commented 2 years ago

I'm closing the issue then, feel free to re-open if you have more ideas about this.

Adding a new layout should be quite easy, see this PR for an example: https://github.com/Julow/Unexpected-Keyboard/pull/16

rambip commented 2 years ago

I encountered another odd behaviour: In some applications, the gboard replaces the "return key" icon by a magnifier icon, and sometimes by a tab icon. But I can't find the keys this version of the return key is emulating. How can I find documentation on that ?

Julow commented 2 years ago

This special "return key" on some applications is not on Unexpected Keyboard at the moment. It usually corresponds to a "send" icon or "ok" button that is easily accessible. Do you have an example of app that relies on this button ?

rambip commented 2 years ago

In almost every search bar, when the button is not accessible: the app "leboncoin" to name a very specific one but I'm sure there are others.

The app "lexilize flashcards" also requires a different type of keys when you enter new words.

Julow commented 2 years ago

Thanks for the report. I'll try to fix that for the next release.

Julow commented 2 years ago

The keyboard should now have this special return key. 53113ca, dfec26a