While I'm hunting for the complete 9p flag, consider this. I think we
might be able to emulate two independent mouses. When Stick button is
pressed, we remember it and until released, do not report this button in
the Pad events. When Pad button is pressed, we remember it, and until
released, do not report this button in the Stick events.

HW does this:
Push Stick button, move Pad -> generates Pad events with Stick's buttons!
Push Pad button, move Stick -> generates Stick events with Pad's buttons!

We would just add one state machine, which would remember one set of
buttons (array[3]). Like HW reports. Every time there is a button pushed
(previously released), we remember which dev sent it. Until we receive a
packet with this button released, we do not report this button as pushed
to input layer of the *other* device. Once we receive a packet (from ANY
device) with this button released, we zero its state in our array[3] and
report a release for the *original* device.

The genius of this is that X also has ONLY ONE SET of 1-2-3 buttons.
Sure, input layer has button state for *each* device, but using the
state machine, we prevent stuck buttons on our ALPS, but do not break
other, independent, APLS (if any exist), because X don't see independent
buttons anyway.

Thinking about this, I'm beginning to believe it would be the best
solution and possibly, a similar concept to what Windows do.

I'll implement it and test thoroughly. If it works and behaves in X
exactly like my ThinkPad Pad (including X events level), which is truly
"2 independent mouses", we can conclude that this algorithm is
orthogonal and can be used on all devices.

If we find something is fishy on e.g. 2-button ALPS, we would have to
add a module parameter to allow this solution only selectively. Did you
find any HW ID which would differentiate between 2- and 3-button
version?

This is the same, I thinkt:

alps.c: E6 report: 00 00 64
alps.c: E7 report: 62 02 14
alps.c: E6 report: 00 00 64
alps.c: E7 report: 62 02 14

-- 
ALPS DualPoint Touchpad flaky performance
https://bugs.launchpad.net/bugs/296610
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to