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

Swipe angle is calculated incorrectly when swipe leaves the keyboard's top border #96

Open
3 tasks done
slashdevslashurandom opened this issue Feb 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@slashdevslashurandom
Copy link

Context

It seems like when determining which of the swipe actions to use on any key, the destination of the swipe is "clamped" to within the keyboard's area.

This doesn't work as well when one swipes upwards from keys that are already on the top row, making, for example, inputting the ^ key on the English layout harder than it should be.

Steps to reproduce

  1. Try to input a ^ character by doing a long swipe upwards from the "n" key.
  2. If your swipe happens to be horizontally aligned with the ` or ´ character (can be determined using the pointer trail)

Below is a screenshot indicating such a scenario. The white circle with a shadow indicates where the screen is being touched at the moment.

Screenshot_20240217_143720_Markor_1

Expected behavior

The angle of the swipe should result in the ^ character being inputted.

Actual behavior

The ` character is inputted.

Android version

Android 14

Device

Samsung Galaxy M33 5G

Other details

No response

Acknowledgements

  • I have written a short but informative title.
  • I have searched the existing issues and this is a new one, NOT a duplicate or related to another open issue.
  • I have filled out all of the requested information in this form.
@slashdevslashurandom slashdevslashurandom added the bug Something isn't working label Feb 17, 2024
@nightkr
Copy link
Owner

nightkr commented Feb 17, 2024

Sadly there isn't a huge amount we can do about this, the clamping seems to come from Android itself (or at least it happens before Jetpack Compose hands the events to us). At best I think we could treat the pointer leaving the keyboard as either pointer-up or cancel events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants