Skip to content

Add additional swipe mode - actions on swipe (i.e. Fleksy mode)#1898

Open
ndom91 wants to merge 38 commits intofuto-org:masterfrom
ndom91:fleksy-swipe-mode
Open

Add additional swipe mode - actions on swipe (i.e. Fleksy mode)#1898
ndom91 wants to merge 38 commits intofuto-org:masterfrom
ndom91:fleksy-swipe-mode

Conversation

@ndom91
Copy link
Copy Markdown

@ndom91 ndom91 commented Feb 22, 2026

  • Closes Add More Swiping Gestures to Keyboard #1065
  • Modify's swipe settings to be an enum with 2 options (mutually exclusive) + Disabled
    • Pre-existing "Swipe Typing" mode
    • New "Swipe Actions" mode
  • The new "Swipe Actions" mode basically copies the Fleksy behaviour which means:
    • Swipe Up: Undo an auto-suggestion
    • Swipe Down: Move auto-suggestion forward 1
    • Swipe Back: Backspace character / word
    • Swipe Forward: Apply suggestion / space / punctuation
  • Works best with / emulates Flesky feeling best with:
    • Swipe mode: "Swipe Actions (alpha)" (required to enable this at all)
    • "Automatic Spaces Mode" disabled
    • "Long press keys" -> delay reduced from 300ms -> 100ms and disable all of those long press key options if you're not using them.
      Not strictly necessary, but significantly helped me feel like I was getting closer to the typing speed I had with Fleksy
    • "Undo autocorrect on backspace" disabled
    • "Double space full stop" enabled
  • Refactored the automatic spaces mode dropdown a tiny bit to use a native dropdown instead of the "inline" dropdown that would cause large layout shifts with a slightly awkward animation when opening/closing - hope thats alright!
  • Added support for subtitles to the SettingsRadio component for this new settings section.
  • I've signed the CLA
  • This PR was created with the help of AI

Question:

  1. What's the best way update the translations for the new strings? (I'm happy to update these for my new strings, just don't know where to make the change - via https://i18n-keyboard.futo.org/?)
    • I see there are auto-generated translations in the submodule, should I put those changes in this PR?
CleanShot 2026-02-22 at 13 01 19

@magvag
Copy link
Copy Markdown

magvag commented Feb 22, 2026

Really excited to see this merged.

A UI suggestion: it's best to use radio buttons for mutually exclusive options. Maybe something like

Swipe input

  • Swipe typing
  • Swipe actions
  • Disabled

@ndom91
Copy link
Copy Markdown
Author

ndom91 commented Feb 22, 2026

Really excited to see this merged.

A UI suggestion: it's best to use radio buttons for mutually exclusive options. Maybe something like

Swipe input

  • Swipe typing
  • Swipe actions
  • Disabled

Yeah good shout - let me update this

@Zvonimir-FUTO Zvonimir-FUTO added Enhancement Request for a new feature UI/UX labels Feb 23, 2026
@ndom91
Copy link
Copy Markdown
Author

ndom91 commented Mar 8, 2026

@magvag no problem. Let me know if there's anything you think we should tweak. I've been daily-driving it since opening this PR and am pretty happy with it at this point.

Recommended "Keyboard & Typing" settings to emulate Fleksy behaviour include:

  • Swipe mode: "Swipe Actions (alpha)" (required to enable this at all)
  • "Automatic Spaces Mode" disabled
  • "Long press keys" -> delay reduced from 300ms -> 100ms and disable all of those long press key options if you're not using them.
    • Not strictly necessary, but significantly helped me feel like I was getting closer to the typing speed I had with Fleksy
  • "Undo autocorrect on backspace" disabled
  • "Double space full stop" enabled

Apk can be found on my gdrive here: https://drive.google.com/file/d/1U04Gr2siSExq_0H-rmcYY_TZK5RiWsXE/view?usp=sharing

@magvag
Copy link
Copy Markdown

magvag commented Mar 8, 2026

@ndom91 thanks! so far so good, will come back with feedback later!

@magvag
Copy link
Copy Markdown

magvag commented Mar 8, 2026

first bug! horizontal swiping on space bar should be a separate zone with its own triggers. right now both swiping and long pressing do not work as language switcher and cursor mover.

edit: same goes for swipes from backspace, not sure it should be addressed.

@magvag
Copy link
Copy Markdown

magvag commented Mar 8, 2026

2: a swipe to the left removes spaces as a separate instance. e.g. "two words" will require 3 swipes to remove.

3: a swipe up to restore original spelling makes the cursor go wild. if you swipe up in the middle of some paragraph, the cursor ends up glued to the start of a next word. If you swipe in the end of that paragraph, cursor jumps to the next line.

4: swiping up past original spelling of the last word starts spamming next word suggestions (or is it the end of the list of autocorrection suggestions?)

5: currently the swipe to the left feels like "selecting a word manually and removing it". I can even see the blue highlighter and it feels rather slow on my low-ish end device. Would be easier to just reuse the logic under the "Backspace behaviour while holding or swiping: delete whole words" setting (will solve bug №2 as well)

if you are feeling like making a whole new feature, an "Add/remove last word to personal dictionary" action PR would be terrific. Currently it's very cumbersome to add words to dictionary since it requires going into settings. And with this functionality it would be trivial to replicate Fleksy behaviour of adding or removing words to dictionary with a swipe up (bug №4)

overall thanks for your marvellous contribution. if you need reproduction steps or videos, I'll be glad to make them

@magvag
Copy link
Copy Markdown

magvag commented Mar 8, 2026

  1. moving cursor on another word and swiping up/down will replace this word with a correction for the last typed word. e.g. type "well hellp", move cursor on "well" and swipe down – resulting text is "hello hellp"

If you look how Fleksy manages swipe corrections, you will see that it stores suggestions and original spelling for every word in a typed (in one session) text block, so if you move you cursor to another word, you will see its state and corrections. Having this type of structure is a fundamental change, might not be mergeable – but at the very least the swipe correction should be disabled if the word under/before it is not the target one

@ndom91
Copy link
Copy Markdown
Author

ndom91 commented Mar 9, 2026

Amazing, thanks for the detailed feedback! I'll try to knock some of the low hanging fruit ones out this week and come back with a more detailed response when I have a bit more time 🙏

@ndom91 ndom91 force-pushed the fleksy-swipe-mode branch from 7432c28 to 805effa Compare March 15, 2026 20:01
@ndom91
Copy link
Copy Markdown
Author

ndom91 commented Mar 15, 2026

@magvag

  1. Fixed the bug regarding keeping the other swipe behaviour on space/delete intact
  2. Fixed swipe to the left with a preceding space "continues deleting" the preceding token as well
  3. and 4. Can't reproduce this one 🤔 swiping up to restore original works here but then yeah this is looping around on the list I think. I double checked with Fleksy and you're right, up should only be able to be done once and only if an auto-correct has been applied, in order to undo that autocorrect. Will fix this Fixed
  4. Fixed Will also look into using the backspace's delete whole word behaviour to improve perf here.
    • Needed a bit of additional code to support "swipe-left-to-delete-whole-word" in situations like hello the|re where you'd expect a swipe-left to result in hello|, not hello| re.
  5. Yes that does sound like a much more significant change. I'll try your suggestion to have it at least not apply the suggestion to other words other than the target. Fixed and each word can be independently swiped down and back up now

@ndom91 ndom91 force-pushed the fleksy-swipe-mode branch from cca3d33 to 59da6e0 Compare March 15, 2026 20:33
@ndom91 ndom91 force-pushed the fleksy-swipe-mode branch from 59da6e0 to 231c1be Compare March 15, 2026 20:38
@ndom91
Copy link
Copy Markdown
Author

ndom91 commented Mar 15, 2026

@magvag okay I think I've got all your reported bugs squashed 🤞 I also fixed a bug regarding adding punctuation to the last word if theres a space between the cursor and the last word, instead of adding it after the space.

Let me know how this build feels: https://drive.google.com/file/d/1R1W1xQ7W9TSnng4fI-Dh0tRNi4bAIFMI/view?usp=sharing

I noticed that if you swipe down through suggestions and it recommends an emoji (i.e. from 'team' -> swipe down a few times), this kind of breaks the 'swipe back up to the original word' behaviour. As long as there are no emoji's though it should be fine as of that build haha. Can take a look at this again soon.

This build feels really good imo. I feel really at home on this from Fleksy and I can move super fast in terms of text input again!

@magvag
Copy link
Copy Markdown

magvag commented Mar 17, 2026

@ndom91 I’ve been using it for a day and I think you are crushing it! Must more solid and faster too. I like how you can even use swipe down to finish a word with a first suggestion, which is how that gesture is done in #1923 (there really are a lot of Fleksy devotees).

And the up/down swipes can be used not only on the last word! I’ve encountered a bug tho, when you replace a word in the middle of a text, move cursor to another word and swipe down there, it will be replaced with a correction for the previous word. Can record a video later today.

I don’t know how you’ve done it (I suppose by pulling from the output for the suggestion bar), but that suggestion/correction pull should be done each time a cursor moves IMHO. Wondering if the original spelling for each word is stored somewhere too already?

The biggest gripe as of today is swiping up/down not recognized when expected — I really need to make a proper long swipe for that. I suppose that’s because vertical swipes are shorter than horizontal ones and the whole swipe recognition was made for space/backspace swipes. Could you perhaps make two developer settings with swiping length threshold / sensitivity coefficients for vertical and horizontal swipes, so we can figure out a comfortable setting?

P.S. Can confirm, emoji suggestion behave weird and start multiplying when swiping on them.

@ndom91
Copy link
Copy Markdown
Author

ndom91 commented Mar 17, 2026

Thanks for the feedback! Will take a look at your latest bug report. I think I know what you mean, once you have it loaded up with the history of suggestions for one word, so you speak, if you change the cursor to another word it would apply those suggestions there then when swiping up/down, right?

It builds a cache off the suggestion list and it isn't clearing it on cursor move correctly most likely.

Ideally I don't want to modify this project any more than necessary, outside of this new feature of course, but I agree it'd be nice to have some global swipe sensitivity settings in addition to distance, like tolerance for off angles.

I played around with the values in this branch a good bit to match my preferences / muscle memory for swipe distance and tolerance for angle offsets (off of the perfect vertical / horizontal swipe), but of course that won't make everyone happy.

But yeah I've been daily driving this build since the other night as well and am super happy with it so far too. Will get those bugs squashed and hopefully another maintainer can help us get it merged soon then 🤞

@ndom91
Copy link
Copy Markdown
Author

ndom91 commented Mar 17, 2026

@magvag okay I think I've got the emoji and up/down different word bug fixed here 🤞

https://drive.google.com/file/d/1GJ-KsSTSW6FhoO-WO_om8tR3sInW0Zgq/view?usp=sharing

Appreciate all the testing!!

@magvag
Copy link
Copy Markdown

magvag commented Mar 18, 2026

@ndom91 daily driving it for a few hours and it feels great! Totally understand your desire to not overload this PR with features. The swiping tolerance is just a matter of muscle memory for me, no big deal to relearn.

Have found a rather rare bug: if you move a cursor in between space and the first letter of the word, swipe left will remove this word and not the word before it. E. g. "real |deal" to "real |"

Otherwise it's only the suggestion bugs I mentioned in PR 1923. Thank you so much for your contribution, typing with this feature is a blast!

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

Labels

CLA-signed Enhancement Request for a new feature UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add More Swiping Gestures to Keyboard

3 participants