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

Add ABC mode timeout for same-key characters #156

Closed
justbruce opened this issue Jan 26, 2023 · 5 comments · Fixed by #269
Closed

Add ABC mode timeout for same-key characters #156

justbruce opened this issue Jan 26, 2023 · 5 comments · Fixed by #269
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@justbruce
Copy link
Contributor

When using ABC mode, it would be helpful if there were a time period after which the currently highlighted character was entered to allow for entry of the next character.

[For example the domain extension ".edu". Currently requires 3 additonal key presses to get "ed"]

Could be a user-selectable thing or hard-coded if that makes more sense

@justbruce justbruce changed the title ABC mode timeout for same-key characters Add ABC mode timeout for same-key characters Jan 26, 2023
@sspanak
Copy link
Owner

sspanak commented Jan 26, 2023

It should definitely be user-selectable. Automatically accepting the selection is one of the most annoying things other keyboards do. I definitely want to keep this option off.

The other reason I haven't done it so far is, because Java makes delayed operations overcomplicated... sadly...

Anyway, I see value in doing this, so it stays on the backlog.

@sspanak sspanak added the enhancement New feature or request label Jan 26, 2023
@sspanak
Copy link
Owner

sspanak commented Jan 31, 2023

Requirements:

  • Add a new preference category: "ABC Mode"
  • Add a new on/off option under the new category: "Auto accept selected letter"
    • When on, SettingsStore would return timeout of 800 ms.
    • When off, the return value is 3600000 (1 hour).
  • Add an autoAcceptTimeout in the input modes (or choose another appropriate name).
    • ModeABC returns the value from SettingsStore.
    • All other modes return 1 hour.
  • Implement the auto accept in TraditionalT9.
    • Get the time value from the input mode.
    • (Re)Start the timer:
      • upon receiving new suggestions (in TraditionalT9.handleSuggestions())
      • in nextInputMode(), when changing the text case
      • in nextSuggestion() and previousSuggestion().
    • Clear the timer when the suggestions are cleared.

@felipecrs
Copy link

felipecrs commented Feb 16, 2023

+1 for this feature, it's the only actually missing thing to be able to fully use this app, at least for me my father.

@sspanak sspanak linked a pull request Mar 20, 2023 that will close this issue
@sspanak sspanak removed a link to a pull request Mar 21, 2023
@qascot
Copy link

qascot commented May 2, 2023

I have made this:
in ModeABC.java added public int autoAcceptTimeout() { return 800; }
in other modes added public int autoAcceptTimeout() { return 3600000; }
in InputMode.java added abstract public int autoAcceptTimeout();
in TraditionalT9.java added final Handler t9releasehandler = new Handler(); Runnable mt9release = new Runnable() { @Override public void run() { commitCurrentSuggestion(); clearSuggestions(); } };
than in TraditionalT9.handleSuggestions() and also in previousSuggestion() and nextSuggestion() were added t9releasehandler.removeCallbacks(mt9release); and t9releasehandler.postDelayed(mt9release, mInputMode.autoAcceptTimeout());
Now testinig how it works and feeling happy. Thanks to sspanak for detailed description in requirements!

@sspanak
Copy link
Owner

sspanak commented May 9, 2023

I have already started preparing the code base and will soon include the feature officially. Stay tuned!

@sspanak sspanak added this to the v22.0 milestone May 10, 2023
@sspanak sspanak self-assigned this May 30, 2023
@sspanak sspanak linked a pull request May 30, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants