From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dwayne Litzenberger <dlitz@patientway.com>
Cc: linux-input@vger.kernel.org
Subject: Re: evdev interface question: ABS_X without ABS_Y?
Date: Wed, 26 Oct 2011 22:44:12 -0700 [thread overview]
Message-ID: <20111027054412.GC15725@core.coreip.homeip.net> (raw)
In-Reply-To: <8A5EDD26-9BFD-4DAE-9C88-8E8D0908CE8B@patientway.com>
Hi Dwayne,
On Wed, Oct 26, 2011 at 05:10:23PM -0400, Dwayne Litzenberger wrote:
> I have a quick question about the /dev/input/eventX interface with
> userspace.
>
> Let's say I have a touchscreen, and I move my finger to (200,100).
> I'll see something line this (simplified):
>
> EV_ABS ABS_X 200
> EV_ABS ABS_Y 100
> EV_SYN
>
> Next, let's say I see something like this:
>
> EV_ABS ABS_Y 90
> EV_SYN
>
> What is the meaning of that, from the perspective of userspace?
> I see two possibilities. Either:
>
> 1. It's a move to (200,90), or
> 2. It's a move to (0,90)
>
> Which is the correct interpretation?
Door #1.
> Is this documented anywhere?
>From Documentation/input/event-codes.txt:
"The input protocol is a stateful protocol. Events are emitted only when
values of event codes have changed. However, the state is maintained
within the Linux input subsystem; drivers do not need to maintain the
state and may attempt to emit unchanged values without harm. Userspace
may obtain the current state of event code values using the EVIOCG*
ioctls defined in linux/input.h."
>
> Apparently, the usbhid driver is generating events that imply #1, but
> xserver-xorg-input-evdev interprets these according to #2. I'm trying
> to figure out what needs to be patched. :)
xserver-xorg-input-evdev.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2011-10-27 5:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 21:10 evdev interface question: ABS_X without ABS_Y? Dwayne Litzenberger
2011-10-27 5:44 ` Dmitry Torokhov [this message]
2011-10-27 13:53 ` Dwayne Litzenberger
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=20111027054412.GC15725@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=dlitz@patientway.com \
--cc=linux-input@vger.kernel.org \
/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).