From: Henrik Rydberg <rydberg@euromail.se>
To: Peter Hutterer <peter.hutterer@who-t.net>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Andrew de los Reyes <andrew-vger@gizmolabs.org>,
hdegoede@redhat.com, jikos@jikos.cz,
David Herrmann <dh.herrmann@gmail.com>,
Linux Input <linux-input@vger.kernel.org>
Subject: Re: How to indicate hover touch when exact distance unknown?
Date: Wed, 24 Sep 2014 07:28:07 +0200 [thread overview]
Message-ID: <54225667.30801@euromail.se> (raw)
In-Reply-To: <20140924045213.GA4194@jelly.redhat.com>
>>> FWIW, hid-multitouch already support those devices.
>>> ABS_MT_DISTANCE is set with a min/max of 0/1 when we detect win8
>>> certified panels with hovering capability. By default the spec does not
>>> provide the distance IIRC, and you only have one byte: InRange.
>>
>> Hmm, I missed that and this is unfortunate. The ABS capabilities
>> advertised by the devices should match their real capabilities. If
>> device can't properly report distance it should not be using
>> ABS_MT_DISTANCE/ABS_DISTANCE...
>
> I think the hid-mt behaviour makes sense. Without explicit resolution (and
> no device sets that anyway, IIRC) any distance value > min tells us only that a
> tool is within detectable range, but not yet touching. Anything between
> min/max is only useful as a relative scale, but effectively that [min,max]
> range could be a metre or a millimeter, we can't know. So a device with a
> 0/1 range simply has low granularity and is only able to detect whether
> something is within range or touching the surface.
I agree with this, but I also share Dmitry's concern.
A device that can detect hovering, if only binary, does in fact coarsely
estimate the distance from the touching surface. A device allowing for a smooth
approach of objects would simply support a better resolution. From that
perspective, using the ABS_MT_DISTANCE capability makes sense. Pragmatically.
However, at no point are we really changing the coordinate system, which remains
euclidian space. We are simply changing resolution and thresholds for what
constitues a touch. Forcing userland to step away from the simple interpretation
is what eventually makes the capability impossible to use as intended.
So, if we cannot express, using the abs_info data, something like "contains a
detector which can coarsely estimate the distance and then uses a detector
threshold to set that distance to zero or one", we had better express it in some
other way, which is less ambiguous.
How about ABS_MT_PRESENT and/or ABS_PRESENT? It would complement TOUCH in the
case of hovering, allow the state where the tool is there but not touching, and
would unambiguously advertise the capability of detecting presence. It would
also be forward compatible with additional capabilities, such as reporting the
actual distance to the surface.
Henrik
next prev parent reply other threads:[~2014-09-24 5:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAG_cf+dJfiqW_V1k4MfGMBNUK9Kgc4=9BPAuum7dbs6rkmAgrQ@mail.gmail.com>
2014-09-23 14:59 ` How to indicate hover touch when exact distance unknown? Benjamin Tissoires
2014-09-23 16:28 ` Dmitry Torokhov
2014-09-23 16:46 ` Andrew de los Reyes
2014-09-23 18:52 ` Henrik Rydberg
2014-09-24 0:27 ` Dmitry Torokhov
2014-09-24 4:52 ` Peter Hutterer
2014-09-24 5:28 ` Henrik Rydberg [this message]
2014-09-26 13:50 ` Benjamin Tissoires
2014-10-01 16:22 ` Dmitry Torokhov
2014-10-08 15:00 ` Henrik Rydberg
2014-09-26 4:07 Chung-Yih Wang (王崇懿)
-- strict thread matches above, loose matches on Subject: below --
2014-09-23 14:37 Andrew de los Reyes
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=54225667.30801@euromail.se \
--to=rydberg@euromail.se \
--cc=andrew-vger@gizmolabs.org \
--cc=benjamin.tissoires@redhat.com \
--cc=dh.herrmann@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hdegoede@redhat.com \
--cc=jikos@jikos.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).