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
Input: Only ignore hovering *pen* events on the Elipsa #8021
Conversation
There are currently too many broken 0-pressure *finger* events being reported on the Elipsa, making a dumb rejection highly annoying.
First commit depends on koreader/koreader-base#1393 |
contact... That's easy enough to check: they actually have an ID that's not -1 ;).
Also includes a rewrite of the Needs actual testing on earlier |
function Input:handleKeyBoardEv(ev) | ||
-- Detect loss of contact for the "snow" protocol... | ||
if self.snow_protocol then | ||
if ev.code == C.BTN_TOUCH and ev.value == 0 then | ||
-- Kernel sends it after loss of contact for *all* slots, | ||
-- only once the final contact point has been lifted. | ||
if #self.MTSlots == 0 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not interested to understand all that, but just reading this, I wonder: why do we handle touch/MT/multitouch slots in a handleKeyBoardEv() function ?!
If this is not an error, it may need a bit of comment saying why :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because BTN_TOUCH is a "keyboard" event, contrary to the other touch events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it's an EV_KEY
event, while the other handler is for EV_ABS
... and EV_SYN
(which includes SYN_REPORT
, which is where we actually finalize the slot data and send it to GestureManager ;). Hence the early return in this new branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2, 2 of 2 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @poire-z)
Hasn't eaten my Forma during the week, so, let's see how it fares against a wider audience... ;). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @poire-z from a discussion.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @NiLuJe)
frontend/device/input.lua, line 443 at r3 (raw file):
Previously, NiLuJe (NiLuJe) wrote…
Yep, it's an
EV_KEY
event, while the other handler is forEV_ABS
... andEV_SYN
(which includesSYN_REPORT
, which is where we actually finalize the slot data and send it to GestureManager ;). Hence the early return in this new branch.
Done.
The kernel currently reports an ungodly amount of bogus 0-pressure finger down events, making the previously dumb logic highly annoying.
I can deal with missed pen taps (somewhat, it's still annoying). But missed finger taps are highly aggravating.
This change is