Skip to content

Feature request: Text replacement #2039

Description

@abb128

Use Cases

Multiple use cases:

  • User wants to make xyz replace with a full sentence like Ich habe einen Anruf von Ihrer Nummer erhalten, oder? Ich bin heute leider nicht da. Bitte versuchen Sie es morgen nochmal. Danke!. This is currently not possible due to a 48 character limit on the BinaryDictionary
  • User wants @@ to be replaced with their email address, example@example.com. This is currently not possible because @@ never enters composition, so dictionary shortcuts are never even considered
  • User wants text to be replaced automatically, not just get suggested. This is currently not possible, other than by changing the behavior to make all shortcuts auto-replace, which might be undesired. There is no boolean flag in the personal dictionary to specify whether it should be auto-replaced or not, other than maybe something hacky could be achieved with the frequency field
  • User wants text replacement in general, but the current system is too confusing and it's unclear that they should look in Personal Dictionary for this

Proposal

Remove the shortcut field from personal dictionary. Create a new Text Replacement menu with no limitation of symbols or output length, including allowing multiline replacement strings.

Each entry will have a Shortcut and Replacement field. There should be a placeholder to make it clear which is which, and the replacement field should be taller than the shortcut field to make it even clearer. There should be a checkbox/radiobutton for auto-replacement or just showing up as a suggestion, and it should be set to auto replace by default.

Internally the IME should be looking at preceding text or recent input events to determine if a shortcut is applicable, so that it doesn't depend on the composition system. It should check for word boundaries, so that an example shortcut for (en -> English) doesn't change then to thEnglish. The suggestion bar should indicate that the next input event will perform a replacement and also give the opportunity to skip it. Long pressing the replacement suggestion should allow deleting the replacement if it's no longer wanted. The lookup may be done efficiently by building a reverse trie of all replacement shortcuts.

Replacements should also apply to voice input.

Existing personal dictionary shortcuts should still continue working the way they do currently and continue to be editable for existing shortcuts, but users won't be able to add new ones and they should gradually transition to the new system.

References

No response

Activity

  1. added theissue type on May 21, 2026
  2. added
    Enhancement
    on May 21, 2026
  3. added
    QoL
    on May 21, 2026
  4. Solaris713 commented on Jul 27, 2026

    @Solaris713

    Hi, I'm quite interested in this feature. I've been using Futo Keyboard for several years and I find it a hassle to have to type in my email address every time. Do you know when this feature will be released ?
    Thanks in advance !

  5. f4r24 commented on Jul 31, 2026

    @f4r24

    I would also like to enjoy these improvements, especially the extension of the text lengths limit of 48 characters. Thanks for your excellent work.

  6. VIPKaiser commented on Aug 11, 2026

    @VIPKaiser

    This feature is something i use and i'm really missing by switching to FUTO. Please implement this feature 🙏.
    TIA.

  7. VIPKaiser commented on Aug 12, 2026

    @VIPKaiser

    Following up on my comment above - rather than just ask for this, I went and built the core of it. I'd like to contribute it, but before opening a PR I'd rather check the design against what you had in mind, since it touches InputLogic and I don't want to hand you something built on assumptions you'd reject.

    What I have working:

    • Replacements stored separately from the personal dictionary, as JSON in the settings DataStore. No length limit, no restriction on which characters a shortcut can contain, multiline replacements work.
    • A new Text Replacement settings screen under Text Prediction, with the shortcut/replacement fields and the replacement field taller as described.
    • Matching walks backwards from the cursor over the preceding text using a reverse trie keyed on the reversed shortcut, so it doesn't depend on the composition system and @@ works.
    • Word boundary check, so en -> English leaves then alone.
    • The separator lookup runs before the separator event is handled, otherwise the shortcut gets autocorrected before it can be expanded.

    Three design decisions I made that I'd want your call on:

    1. When a shortcut fires. A shortcut containing word characters waits for a separator. A shortcut made up only of symbols (@@) has no separator to wait for, so it expands as soon as it's typed. This covers both use cases in the issue but it is a heuristic — happy to change it.

    2. Case sensitivity. Matching ignores case. Without this, a shortcut is unusable at the start of a sentence: auto-capitalization turns omw into Omw, the match fails, and autocorrect then mangles it (Omw became One in my testing). The replacement is committed exactly as entered rather than recased to match. This does mean OMW and omw are the same shortcut.

    3. Scope. I deliberately stopped short of the suggestion bar work - the pending-replacement indicator, skip, and long-press-to-delete - and of voice input, since injecting non-composition-derived items into the strip has to coexist with LanguageModelFacilitator overwriting it asynchronously, and I'd want to know how you want that done before writing it. Everything currently auto-replaces; the autoReplace flag is stored per entry but suggestion-only entries are never expanded yet. The personal dictionary is untouched, so nothing regresses for existing shortcut users.

    Verified on an emulator: omw -> On my way , Omw -> On my way , then stays then , standalone en -> English , @@ -> example@example.com on the second @. 13 unit tests for the matcher.

    Happy to open a PR with this as-is, adjust the above first, or drop it if you'd rather build the whole thing yourself — no hard feelings either way, it's your roadmap item.

  8. joe-cole1 commented on Aug 21, 2026

    @joe-cole1

    Every other swipe keyboard, I've used @@ as my email address, and @@A for my wife's (her name starts with 'a'.

    Not only can I not do that, but for some reason even using 'a@' instead doesn't seem to work well, only about 50% of forms.

    +1 for allowing auto replace to start with symbols!

  9. VIPKaiser commented on Aug 24, 2026

    @VIPKaiser

    Re-pinging on the design above — still happy to open the PR as-is, adjust, or drop it. No pressure either way.

  10. Rickdiculousme commented on Sep 29, 2026

    @Rickdiculousme

    I would also like this

  11. Bunini commented on Nov 18, 2026

    @Bunini

    funny how i switched to futo today and it's the first thing i went looking for and honestly it was handy in samsung keyboard. hopefully we get to see this soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementQoL

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions