flickboard icon indicating copy to clipboard operation
flickboard copied to clipboard

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

Open slashdevslashurandom opened this issue 1 year ago • 1 comments

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

  • [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.

slashdevslashurandom avatar Feb 17 '24 11:02 slashdevslashurandom

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.

nightkr avatar Feb 17 '24 12:02 nightkr

This should be fixed as of 3eb8d4d9b4fb713699756fc0bb5c3034283fb7a0 (whenever v0.1.8 comes out).

Anarchtism avatar Aug 23 '24 01:08 Anarchtism