All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Rydberg <rydberg@bitmath.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Peter Hutterer <peter.hutterer@who-t.net>
Cc: Charles Mooney <charliemooney@google.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Linux Input <linux-input@vger.kernel.org>
Subject: Re: Question about ABS_DISTANCE's intended usage.
Date: Tue, 23 Feb 2016 23:42:03 +0100	[thread overview]
Message-ID: <56CCE03B.9070408@bitmath.org> (raw)
In-Reply-To: <20160223220245.GA3971@dtor-ws>

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


      parent reply	other threads:[~2016-02-23 22:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 21:56 Question about ABS_DISTANCE's intended usage Charles Mooney
2016-02-18 18:19 ` Dmitry Torokhov
2016-02-21 22:04   ` Peter Hutterer
2016-02-22 16:35     ` Charles Mooney
2016-02-22 22:04       ` Peter Hutterer
2016-02-23 22:02         ` Dmitry Torokhov
2016-02-23 22:39           ` Peter Hutterer
2016-02-23 23:08             ` Dmitry Torokhov
2016-02-24  4:12               ` [PATCH] Documentation: event-codes.txt: clarify we want BTN_TOOL_<name> on proximity Peter Hutterer
2016-04-06  5:09                 ` Peter Hutterer
2016-04-06 17:16                 ` Dmitry Torokhov
2016-02-29 16:16               ` Question about ABS_DISTANCE's intended usage Charles Mooney
2016-02-23 22:42           ` Henrik Rydberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CCE03B.9070408@bitmath.org \
    --to=rydberg@bitmath.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=charliemooney@google.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.