Thread (13 messages) 13 messages, 4 authors, 2016-04-06

Re: Question about ABS_DISTANCE's intended usage.

From: Henrik Rydberg <rydberg@bitmath.org>
Date: 2016-02-23 22:58:07

Hi Dmitry, Charles, Peter,
I wonder if this will not confuse clients that do not pay attention to
ABS_DISTANCE though... I take it that libinput and x synaptics drivers
won't be confused, mousedev in kernel relies on BTN_TOUCH, what about
others?
It looks quite ok with BTN_TOUCH added. So for n the number of detected fingers
and d the collective distance to the surface:

BTN_DISTANCE = d
BTN_TOUCH = (d == 0)
BTN_TOOL_FINGER = (n == 1)
BTN_TOOL_DOUBLETAP = (n == 2)
BTN_TOOL_TRIPLE...

This will work for:

1. The simplest touchscreen driver which only looks at BTN_TOUCH.
2. Touchpad drivers that distinguish between fingers present (BTN_TOOL_FINGER)
and fingers touching (BTN_TOUCH).
3. Drivers that already understand BTN_DISTANCE, as per Peter's description.

Charles' three states are then encoded as

#1 (d = 0, n > 0)
#2 (d > 0, n > 0)
#3 (d = ?, n = 0)

I don't recall any kernel or userland driver working any differently either.

Henrik
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help