KeyboardKit / KeyboardKitPro

KeyboardKit Pro helps you create custom keyboards for iOS and iPadOS.
https://keyboardkit.com
Other
110 stars 8 forks source link

Feature Request: Ability to Disable Auto-correction While Keeping Auto-suggestions #7

Closed omerkolkanat closed 10 months ago

omerkolkanat commented 1 year ago

Hello, I'm currently using KeyboardKitPro for a project and have come across a limitation that I'd like to discuss. I want to disable the auto-correction feature while keeping the auto-suggestions feature active.

Current Behavior: When I set the isAutocorrectionEnabled flag to false, it deactivates not only auto-correction but also auto-suggestions.

Desired Behavior: I'd like to have the ability to disable auto-correction independently of auto-suggestions. Specifically, when I tap the space bar after typing a word, I'd like the word not to be automatically corrected while still being able to see auto-suggestion options.

Use Case: This feature would be beneficial for users who want to type freely without being auto-corrected, but who still find value in the auto-suggestions provided by the keyboard.

I understand this might require a significant change, and I appreciate your consideration of this feature request.

Thank you!

danielsaidi commented 1 year ago

Hi @omerkolkanat

This would be very nice to have, great suggestion! 👍

kellvembarbosa commented 10 months ago

This is a feature that I would really want in a next version, it's something that bothers me but I didn't know how to explain it, but after @omerkolkanat opened this issue I managed to replicate the situation and realized that this is something necessary.

A suggestion of mine would be to add the ignored words when the user rejects the correction that was with "auto-correction" Because that means that it can be a slang of the language... The corrections would be much smarter with that...

After two "refusal" of auto-correction this word would be automatically ignored...

An example, in Portuguese the translation of "dash" = "painel" and by slang we usually do not use this translated word.

But LocalAutocomplete suggested "das" instead of "dash" but with auto-correction=true and even though I ignore this correction the keyboard does not stop correcting, turning an infinite loop and making it impossible to use the keyboard.

Below I'm going to put a video:

https://share.cleanshot.com/sFKCzBPP

In this video I gave the example only of the word "dash" this happens with many other words, including in English...

Even when I click 3 times on "Dash" he doesn't learn, if you add only this capability the LocalAutocomplete would be much smarter... Where can I define how many times the ignored word will have the "auto-correction" disabled.

@danielsaidi

danielsaidi commented 10 months ago

Hi Kellvem,

Happy to hear from you, I hope you're well.

This sounds like something that needs to be fixed. I'm planning to add an autocomplete configuration that one can use in the autocomplete engine, so that it's for instance easy to disable autocorrect. Sounds like this could be another addition.

As I'm typing, I realize that this can perhaps go into the autocomplete context, and that that context can be injected into the autocomplete engine? That means the context can have more stuff than it has today.

In that case, tapping on a suggestion that doesn't match any current autocorrect suggestions, would flag the autocorrect suggestion in a key value store. After a certain (configurable) amount, the suggestion will be flagged to not autocorrect.

The good thing with keeping this dictionary in the context, is that it's then easy to build a UI where users can remove any ignored words.

Sounds good?

Best

Daniel

On Thu, Nov 30, 2023 at 5:00 PM Kellvem Barbosa @.***> wrote:

This is a feature that I would really want in a next version, it's something that bothers me but I didn't know how to explain it, but after @omerkolkanat https://github.com/omerkolkanat opened this issue I managed to replicate the situation and realized that this is something necessary.

A suggestion of mine would be to add the ignored words when the user rejects the correction that was with "auto-correction" Because that means that it can be a slang of the language... The corrections would be much smarter with that...

After two "refusal" of auto-correction this word would be automatically ignored...

An example, in Portuguese the translation of "dash" = "painel" and by slang we usually do not use this translated word.

But LocalAutocomplete suggested "das" instead of "dash" but with auto-correction=true and even though I ignore this correction the keyboard does not stop correcting, turning an infinite loop and making it impossible to use the keyboard.

Below I'm going to put a video:

https://share.cleanshot.com/sFKCzBPP

In this video I gave the example only of the word "dash" this happens with many other words, including in English...

Even when I click 3 times on "Dash" he doesn't learn, if you add only this capability the LocalAutocomplete would be much smarter... Where can I define how many times the ignored word will have the "auto-correction" disabled.

— Reply to this email directly, view it on GitHub https://github.com/KeyboardKit/KeyboardKitPro/issues/7#issuecomment-1834057638, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADI6Z5ZLBQR4PDJFDDYU43YHCURBAVCNFSM6AAAAAA443LYQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGA2TONRTHA . You are receiving this because you commented.Message ID: @.***>

kellvembarbosa commented 10 months ago

That sounds great! This part of autocorrection is what really makes a keyboard nice to use, with this improvement the autocorrection will have a continuous evolution as the user begins to type more and more, especially in languages that are different from English...

In the case of Portuguese where the words are long it will be a great improvement, we use the correction a lot....

I will look forward to this resource.

danielsaidi commented 10 months ago

I have implemented this in the v8.1 feature branch. You will be able to disable autocorrect with both the autocomplete context and by adding a .autocorrectDisabled() modifier to the keyboard view.

danielsaidi commented 10 months ago

@kellvembarbosa Can you create a separate issue for your suggestion, since it's a bit tricker.