Swipe angle is calculated incorrectly when swipe leaves the keyboard's top border
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
- Try to input a
^character by doing a long swipe upwards from the "n" key. - 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.
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
- [X] I have written a short but informative title.
- [X] I have searched the existing issues and this is a new one, NOT a duplicate or related to another open issue.
- [X] I have filled out all of the requested information in this form.
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.
This should be fixed as of 3eb8d4d9b4fb713699756fc0bb5c3034283fb7a0 (whenever v0.1.8 comes out).