linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* evdev interface question: ABS_X without ABS_Y?
@ 2011-10-26 21:10 Dwayne Litzenberger
  2011-10-27  5:44 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Dwayne Litzenberger @ 2011-10-26 21:10 UTC (permalink / raw)
  To: linux-input

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?  Is this documented anywhere?

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.  :)

-- 
Dwayne Litzenberger
PatientWay | Access Management Platform
Toll Free: +1-888-786-8929 x29
Tel: +1-613-369-8325 x29
Web: http://www.patientway.com/
Email: dlitz@patientway.com

PatientWay is hiring! http://www.patientway.com/careers


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: evdev interface question: ABS_X without ABS_Y?
  2011-10-26 21:10 evdev interface question: ABS_X without ABS_Y? Dwayne Litzenberger
@ 2011-10-27  5:44 ` Dmitry Torokhov
  2011-10-27 13:53   ` Dwayne Litzenberger
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2011-10-27  5:44 UTC (permalink / raw)
  To: Dwayne Litzenberger; +Cc: linux-input

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: evdev interface question: ABS_X without ABS_Y?
  2011-10-27  5:44 ` Dmitry Torokhov
@ 2011-10-27 13:53   ` Dwayne Litzenberger
  0 siblings, 0 replies; 3+ messages in thread
From: Dwayne Litzenberger @ 2011-10-27 13:53 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input


On 2011-10-27, at 1:44 AM, Dmitry Torokhov wrote:
> On Wed, Oct 26, 2011 at 05:10:23PM -0400, Dwayne Litzenberger wrote:
>> 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.

Awesome.  That's exactly what I need.  Thanks!

- Dwayne


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-27 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26 21:10 evdev interface question: ABS_X without ABS_Y? Dwayne Litzenberger
2011-10-27  5:44 ` Dmitry Torokhov
2011-10-27 13:53   ` Dwayne Litzenberger

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).