-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
OK in DPAD center not working on TCL Flip 2 #182
Comments
I works properly in the apps that accept a default action for this key, but unfortunatelly, many apps do not. I guess, this is mostly an issue in messaging apps. Me too, I would want to fix it only for a predefined list of the most popular apps (Telegram, Messenger, Whatsup and whatnot) and make the key perform the "SEND" action. Detecting the application and checking if it is in the list is easy (the name is in Any help with this will be appreciated. |
So how does the default IME support the SEND function if the app itself
doesn't support default action, there must be a way for an IME to send the
SEND command. Alternatively, would it be possible to unpack the messenger
app and edit it to allow default action?
Thanks for any help, I'm a bit out of my depth here.
…On Mon, Feb 13, 2023, 9:04 AM Dimo Karaivanov ***@***.***> wrote:
I works properly in the apps that accept a default action
<https://developer.android.com/reference/android/inputmethodservice/InputMethodService#sendDefaultEditorAction(boolean)>
for this key, but unfortunatelly, many apps do not.
I guess, this is mostly an issue in messaging apps. Me too, I would want
to fix it only for a predefined list of the most popular apps (Telegram,
Messenger, Whatsup and whatnot) and make the key perform the "SEND" action.
Detecting the application and checking if it is in the list is easy (the
name is in EditorInfo.packageName), but I haven't found a way of forcing
an action.
Any help with this will be appreciated.
—
Reply to this email directly, view it on GitHub
<#182 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQDPZXR2YP5WYR5TBK7A4YTWXI5ONANCNFSM6AAAAAAUZCLBDY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
WhatsApp and Signal both have settings on the Android versions that allow you to send a message with the ENTER key. Signal has it disabled by default, and it seems to vary by manufacturer and client version with WhatsApp whether it is enabled or disabled by default. Might narrow down your research space. |
I did a quick research and according to this link, there is literally nothing to do if the application does not want to process the key press event.
I suppose the default IME emulates ENTER key press (the one on computer keyboards), instead of OK key press (the one on most phones) or it is a custom action. Currently, TT9 does not work with custom actions and does not send ENTER if there is no default action. I could try one of these or both, when in a non-specialized text field (this is important!). But beyond that, I'm affraid, nothing else is possible. |
I connected the phone to scrpcy and was able to type using my keyboard and the |
This bug is also in Qin1S+. But, a long press on the center, functions as send |
I've just learned that on the S22 Flip, there is a translation layer always running (except when it crashes, which is how I found out it existed at all) for the hardware keys. It might be possible that the same thing is happening on other phones, which might explain all the varied types of behaviors being observed. |
Thanks everyone for the comments. You gave me some ideas and I've found a way to make OK work at least as good as in Gboard or OpenBoard. Still, some applications such as Messenger refuse to send when the button is pressed, but I don't think anyone can do anything about it. |
I have released beta-17.4 which fixes the problem. Note that in messaging applications "send with ENTER" must be enabled, otherwise they just ignore OK key. Try it out! |
In the TCL Flip 2 SMS app, even the newer version doesn't work. this can be bypassed by pressing options, then send. just a bit annoying. I will try mapping another key instead of the OK key and see if that helps. |
@sspanak if you can point me to the the code responsible for that it would be amazing. thanks. |
@biden2020prez, this is not a bug. The default SMS application on Android (and some other apps as well) actually request the keyboards not to send anything with OK or ENTER, so I decided to honor the setting and disabled sending in such cases. In other words, it is what the applications author wanted. It may be inconvenient in some cases, but it may be a good idea to save the user form a mishap in others. It depends. Of course, it is possible to ignore the app request, but I haven't considered such option in TT9 so far. |
I have solved this issue for this phone specifically by changing line 619 in TraditionalT9.java from |
@DarthFlip Nice job! I think that was a bug fix for the Cat S22 Flip, which couldn't select words with the D-Pad. Good catch. Now we need to make it a setting probably. I wonder if I can figure out how. |
OK, I am reopening this as it seems the issues still persists in some cases. Android is really confusing with all these alternative keys having almost similar, but not exactly the same functions. I may have gotten it wrong again.
This must not be a setting. The OK key must just work by sending the correct key code. Or maybe it should send both
The code there has nothing to do with selecting the suggestions. |
@biden2020prez, @DarthFlip, could you please try out this APK and let me know if OK is working for you? |
Still doesnt work to send text message by clicking Dpad Center. It works fine (and always has worked fine) for selecting things.
It worked fine to send messages.
You could try that, would it potentially cause a double click? |
I ignored the application request to disable the key. Now OK always performs the target action and on my phone it is able to send an SMS. But if this doesn't work for you, it means your SMS app works differently. It only relies on receiving the I wish it was as simple as replacing the key code, but the problem is, using This is tricky. I see these possible solutions:
I don't want to make force sending the default action for holding OK, because it may be used for something else in the future. I am also open for alternative ideas, if you have any. |
@sspanak I like your idea of long press. But why not make it a setting to choose a different keycode for long press and short press? I know many people who send SMS. Keep in mind you are developing for keypad phones with touchscreen, but many people use this on old phones with no touchscreen. But I guess it would be nice to confirm whether or not it works on other phone's SMS app. |
@biden2020prez , @DarthFlip , I've come up with a hack to send both |
Works fine, thanks! |
I'm using the TCL Flip 2 4058W and the OK button doesn't work in the messages app, for example it selects the word but then won't send the text, though in some other apps it does.
The text was updated successfully, but these errors were encountered: