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

Double tap when pressing center OK button on Kyocera DuraXV Extreme #522

Open
gyadam opened this issue May 21, 2024 · 6 comments
Open

Double tap when pressing center OK button on Kyocera DuraXV Extreme #522

gyadam opened this issue May 21, 2024 · 6 comments
Labels
bug Something isn't working device hack A device bug that requires a hack on our side

Comments

@gyadam
Copy link
Contributor

gyadam commented May 21, 2024

Hi, I've noticed an issue on the Kyocera DuraXV Extreme (non-plus version) where if I press the center OK button once, it not only types the current suggestion, but it also performs the default action for the current application. Basically it does both actions mentioned in the docs:

D-pad Center (OK or ENTER):
When suggestions are displayed, type the currently selected suggestion.
Otherwise, perform the default action for the current application (e.g. send a message, go to a URL, or just type a new line).

Since the intuitive behavior is to just type the current selection, this issue results in sending unfinished text messages when I really just wanted to accept the suggestion.

I never experience issues with double tapping elsewhere so I don't think it's an issue with the keypad. It does seem similar to this issue though: #475

@sspanak
Copy link
Owner

sspanak commented May 22, 2024

This used to be the default behavior before v30.0, but it should be fixed now. Have you updated to the latest version? The current one is v31.0.

@gyadam
Copy link
Contributor Author

gyadam commented May 22, 2024

Yeah, I just built an APK from the source code with the most recent changes and I'm still experiencing the same behavior.

@sspanak
Copy link
Owner

sspanak commented May 23, 2024

OK, just in case, could you please go to Settings -> Keypad, scroll down to Compatibility and enable the key repeat protection. Try with a value of 20-30 ms first. If it still does the same, increase it to 75-100 ms. You can also try higher values, but you won't be able to type so fast. Enabling this option will help us rule out hardware malfunction.

If it is not a hardware problem, then I have absolutely no idea why would this happen. The current code no longer tries to emulate all possible "OK" options at the same time, so I am surprised the problem occurs again.

As I understand, you have technical skills, so maybe you could try debugging it? In the file named HotkeyHandler.java, there is an onOK() method. The if below is supposed to accept the current suggestion and exit:

if (!suggestionOps.isEmpty()) {
	onAcceptSuggestionManually(suggestionOps.acceptCurrent(), KeyEvent.KEYCODE_ENTER);		
	return true;
}

If you have the time and desire to help, please check if:

  • onOK() gets called twice
  • when suggestions are displayed, the if I mentioned does its job properly.

@sspanak sspanak added bug Something isn't working device hack A device bug that requires a hack on our side labels May 23, 2024
@gyadam
Copy link
Contributor Author

gyadam commented May 24, 2024

Sure, I can take a shot at debugging it when I have some time. Thanks for the suggestions!

@gyadam
Copy link
Contributor Author

gyadam commented Jun 3, 2024

@sspanak I haven't had time to debug it properly, but I did install v29.0 on my device yesterday and I don't have the double tap issue with that version. (However I do have the issue where it sends the message and then tries to send a blank message right away.)

@sspanak
Copy link
Owner

sspanak commented Jun 5, 2024

Yes, this is to be expected. The multiple action problem is supposed to be fixed in v30.0 or newer. And, as I mentioned in my previous post, there is a return statement right after confirming the suggestion, which most certainly prevents sending the key code to the connected app and triggering message sending and whatnot. This is why I am surprised you are experiencing a problem.

The only explanation that comes to my mind is the onOK() function gets calls twice in a quick succession. The first call confirms the selected word, and the second call, when the suggestion list is already hidden, proceeds with performing some action (sending a message, in your case). But why this happens, I have no idea.

I do want to fix it, but I don't have a Kyocera phone. Unfortunately, they don't sell them in my country, and they are insanely expensive on Ebay, even second hand. This basically prevents me from providing better support for these phones.

Btw, I didn't get, did you try the repeat protection setting? Did it have any effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working device hack A device bug that requires a hack on our side
Projects
None yet
Development

No branches or pull requests

3 participants
@sspanak @gyadam and others