-
Notifications
You must be signed in to change notification settings - Fork 60
Description
I noticed that with the default deadzone (0.6), it didn't seem to be possible to use "diagonals" on the trackpads when they're configured as buttons. "Diagonals", of course, meaning that, using up and left as an example, the keycodes configured for both up and left would be sent.
I lowered the deadzone a lot (0.2), but noticed a bunch of issues far out on the trackpad - basically, it looks like the X and Y axes don't line up perfectly with the exact horizontal and vertical lines on the trackpads. At least, not mine...maybe there's variation from one to the next. Some testing shows that mine is off by about 0.1π radians.
So, I want to propose a change - rather than using a simple integer deadzone check (which effectively makes the deadzone a square), we can figure out the linear distance of the touch coordinates from center and do a little trigonometry to figure out the angle that we're working with and, consequently, which keycodes to send.