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

Long-press for capital letters #362

Closed
2 of 3 tasks
dasnessie opened this issue Aug 24, 2023 · 24 comments
Closed
2 of 3 tasks

Long-press for capital letters #362

dasnessie opened this issue Aug 24, 2023 · 24 comments

Comments

@dasnessie
Copy link

  • Did you check to see if this issue already exists?
  • Is this only a single feature request? Do not put multiple feature requests in one issue.
  • Is this a question or discussion? Don't use this, use https://lemmy.ml/c/thumbkey

MessageEase allows to swipe back and forth (or in a circle for the center letter of a key) to type a capital letter. This allows you to type faster, especially in languages that have a lot more capitals than English, where auto-capitalize doesn't help much (for example, German capitalizes every noun).

@nejni-marji
Copy link
Contributor

I'm thinking of implementing this. It should just be a matter of storing the furthest point from the start of a swipe and taking that as a middle point. That wouldn't work if your backswipe went too far, but I think that might be okay? If it isn't, I could check specifically for the first backwards change in magnitude?

@nejni-marji
Copy link
Contributor

nejni-marji commented Sep 20, 2023

Actually, I think something more robust like gesture detection might be a better idea that trying to do it from scratch. Or, bare minimum, how to define a circular motion in code?

@dasnessie
Copy link
Author

I'm not sure on the implementation details (I don't know anything about android development), but here's a short video of what my gestures look like on MessageEase: https://github.com/dessalines/thumb-key/assets/43586524/dc1b0f38-864e-46d0-a8b9-88935552e479

@nejni-marji
Copy link
Contributor

I think taking the furthest point from the start will work for swipes but I'm not sure how to handle circles in code yet.

@nejni-marji
Copy link
Contributor

I'm thinking of taking a sample of points and calculating the 1st and 2nd derivative of the angle with respect to time, and reversing that to check rotational continuity. I'll play with a toy example tomorrow and see what I can work out.

@nejni-marji
Copy link
Contributor

Wait, I missed something obvious. If I only do math at the end, I can get the center from the bounding box and check the radius at each sample. If the radius stays within a certain bound, it's round. That and a few other simpler checks should work.

@nejni-marji
Copy link
Contributor

In short:

  • check for a consistent radius across samples
  • check the change in angle is appropriate
  • check the start and end are similar
    Try to abort early if possible to save resources:
  • bounding box is not close to square
  • start and end are too far away

@robinmoussu
Copy link

robinmoussu commented Sep 26, 2023

I’m very interested by this feature, it’s what I’m missing from MessagEase to migrate. And just to be sure that what you where planning to do matches what messagEase is able to do:

  • 8 directions back-and-forth (using North, East, South and West notations + o for origin: o-N-o, o-NE-o, o-E-o, o-SE-o, o-S-o, o-SW-o, o-W-o, o-NW-o)
  • 2 direction for circles (clockwise and anticlockwise)

I guess that some input system could use different variants, like

  • 3 direction for back-and-forth (like o-NNE-o, o-S-o and o-NNW)
  • knowing the starting point of the circle (clockwise + est will draw a circle bellow the starting point, or anticlockwise + north will draw a circle at the left of the starting point). This is what “8pen”, an alternative keyboard for android, uses.

I personally will not need those additional gesture, but I think that it could be nice to at least think of what need to be done to support it and leave a note for future implementer.

@Phidica
Copy link
Contributor

Phidica commented Oct 10, 2023

Duplicate of #317? I'm also keen to have this feature, but I had resigned to it never being implemented

@dessalines
Copy link
Owner

Gonna close this for now, for these reasons:

  • I'd prefer all actions, especially swipes, to be explicit and obvious. Adding hidden functionality isn't something I'd like here. Its already easy enough to go to shifted mode.
  • Not all languages have capital letters, or a caps mode, meaning ...
  • This would need to be a specific keyboard config. For languages like german, we could add a specific auto-capitalize setting, which would be far better than a hidden swipe functionality.

@dessalines dessalines closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
@BlueDrink9
Copy link
Contributor

I've seen you mention this stance through a few issues.

Have you articulated more in-depth anywhere else your reasoning for being so opposed to gestures and hidden features? it seems to me it's throwing a lot of functionality and ergonomics out with the bathwater, so to speak.
i feel like there should be strong reasons in order to justify a stance that leads to such a loss.

(not to mention, auto-caps often fails, as you can see in this message)

@Atn-D
Copy link

Atn-D commented Feb 7, 2024

@BlueDrink9
now we have the @asdkant fork :
https://github.com/asdkant/open-thumb

@asdkant
Copy link
Contributor

asdkant commented Feb 7, 2024

I've seen you mention this stance through a few issues.

Have you articulated more in-depth anywhere else your reasoning for being so opposed to gestures and hidden features? it seems to me it's throwing a lot of functionality and ergonomics out with the bathwater, so to speak. i feel like there should be strong reasons in order to justify a stance that leads to such a loss.

(not to mention, auto-caps often fails, as you can see in this message)
+1 to this, it's a UX discussion worth having. But at least, given the user base of this kind of keyboard, it'd be a good idea to have an explanation of this particular design choice in the README and referenced in the feature request form so people don't come again and again asking for stuff that is against the UX design goals of the project.

@BlueDrink9 now we have the @asdkant fork : https://github.com/asdkant/open-thumb

As I've mentioned elsewhere, don't hold your breath on that one: I'm doing it on my spare time and I do DevOps, not app dev, so my coding experience is mostly in bash/python/etc. and small "run once and finish the job" stuff. I think it'll take me at least a span of a month (using spare time here and there) to get up to speed with Kotlin and Android app dev, after that I'll be able to implement meaningful change to the codebase. If a more experienced dev wants to help, it'll be more than welcome =)

@rommeswi
Copy link

rommeswi commented Feb 9, 2024

This is THE missing feature compared to messagease. I would not even need a proper circle motion just "back-and-forth" and "long press" would do it.

@robinmoussu
Copy link

@asdkant I’m interested to help. Given that my energy is relatively low ATM I cannot guaranty anything, but I would like to try. I’m a dev, but android/kotlin are relatively unknown for me (I’m more of a C++/Rust guy). I tried to find how to build it from source (to eventually test my changes) and install it on my phone without success so far so any link to some docs is welcome.

@BlueDrink9
Copy link
Contributor

Android studio is how I got it to build

@dessalines
Copy link
Owner

If its a simple long-press, I spose this would be fine.

@dessalines dessalines reopened this Feb 9, 2024
@dessalines dessalines changed the title Swipe back and forth for capital letters Long-press for capital letters Feb 9, 2024
@rommeswi
Copy link

I actually started looking into the code and I think a return-press is not too hard to implement (while gestures clearly are a can of worms).

It would mean adding a SlideType "RETURN" in the types and then store the first nonnull swipeDirection in the onDrag part of KeyboardKey.kt. Something like:
val dragReturnDirection = null if (key.slideType == SlideType.RETURN && returnEnabled && dragReturnDirection == null) { dragReturnDirection = swipeDirection(offsetX, offsetY, minSwipeLength, key.swipeType) }
and in the onDragEnd part of KeyboardKey.kt we only need to check if SwipeDirection returns null (meaning no swipe from start to onDragEnd has been detected) and then use dragReturnDirection in place of swipeDirection but using the opposite of the current onToggleShiftMode.

However, we would still need a "longpress" for capitalizing the non-swipe letters.

@Atn-D
Copy link

Atn-D commented Feb 10, 2024

in MessageEase the longpress is used to enter digits

@asdkant
Copy link
Contributor

asdkant commented Feb 10, 2024

in MessageEase the longpress is used to enter digits

yep, people coming from ME won't be happy.

i think being able to define at the keyboard level what long press does would be the better option

@rommeswi
Copy link

I think the main issue is to avoid having to implement circular motion gestures. Defining these and adding configuration options for them is not straightforward. If we can get "long press" "long swipe" and perhaps even "return swipe", former ME users (like myself) will already be a lot happier.

@BlueDrink9
Copy link
Contributor

BlueDrink9 commented Feb 10, 2024

could be a setting to specify which layer the long press goes to. Every board has a main, shifted and numeric layer associated with it. A long press should just index the same positions in that layout.

@Atn-D
Copy link

Atn-D commented Feb 12, 2024

this projet implement many gestures :
https://github.com/nightkr/flickboard

@dessalines
Copy link
Owner

This is done by #854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants