From: Neil Brown <neilb@cse.unsw.edu.au>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
Subject: Re: [RFC/PATCH] Touchpads in absolute mode (synaptics) and mousedev
Date: Tue, 1 Jul 2003 19:40:30 +1000 [thread overview]
Message-ID: <16129.22286.274059.518816@gargle.gargle.HOWL> (raw)
In-Reply-To: message from Dmitry Torokhov on Tuesday July 1
On Tuesday July 1, dtor_core@ameritech.net wrote:
> Hi,
>
> I was trying to teach mousedev to bind to new synaptics driver. This
> may be useful for gpm and other programs that don't have native event
> processing module written yet. Unfortunately absolute to relative
> conversion in mousedev only suits for tablets (digitizers) and not for
> touchpads because:
>
> - touchpads are not precise; when I take my finger off touchpad and then
> touch it again somewhere else I do not expect my cursor jump anywhere,
> I only expect cursor to move when I move my finger while pressing
> touchpad.
Yep, that's a bug. mousedev needs to know when there is or isn't a
finger and ignore absolute differences when there is no finger.
> - synaptics has Y axis reversed from what mousedev expects.
>
> I tried to modify mousedev to account for differences between touchpads
> in absolute mode and digitizers in absolute mode but all my solutions
> required ugly flags - brrr... So what if we:
>
> 1. Modify mousedev so if an input device announces that it generates both
> relative and absolute events mousedev will discard all absolute axis
> events and will rely on device supplied relative events.
Nah. I have an ALPS dualpoint which generates ABSolute events for the
touchpad part and RElative events for the pointstick part. I want
them both.
> 2. Add absolute->relative conversion code to touchpad drivers themselves
> as drivers should know the best how to do that. If they turn out to be
> similar across different touchpads then the common module could be
> made.
>
> What you think?
I think that mousedev should be just clever enough to mostly work and
no cleverer. Anything more interesting should be done in user-space.
For example, there is the idea of treating one edge of a touch pad
like a scroll wheel. I don't think this should be done in the
kernel.
I have just started working on a program to do this. It opens
/dev/input/event1 (in my case) to read events from the touchpad. It
uses an ioctl to "grab" the device so mousedev doesn't see any events
directly.
Then it opens /dev/input/uinput and registers itself as a mouse-like
device. It copies event from one to the other with some translation.
It will eventually do all the magic abs->rel translations that I want
and notice corner-taps and such. At the moment it only does some
simple mapping of button events so that I can use one of my two 'left'
buttons as a 'middle' button.
I actually think that it should be possible to do everything in
user-space. I find it quite awkward that I *cannot* get a clear
channel from a user-space program to the PS/2 aux port like I could in
2.4 via /dev/psaux. I would really like to be able to open some
device, "GRAB" it, and then have complete control of the PS/2 AUX
port. Then I could similarly open /dev/input/uinput and do exactly
what translations I wanted.
NeilBrown
next prev parent reply other threads:[~2003-07-01 9:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-01 8:03 Dmitry Torokhov
2003-07-01 9:40 ` Neil Brown [this message]
2003-07-01 18:29 ` Dmitry Torokhov
2003-07-01 23:43 ` Neil Brown
2003-07-02 0:57 ` Dmitry Torokhov
2003-07-02 6:59 ` Vojtech Pavlik
2003-07-01 12:02 ` Felipe Alfaro Solana
2003-07-01 18:18 ` Dmitry Torokhov
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=16129.22286.274059.518816@gargle.gargle.HOWL \
--to=neilb@cse.unsw.edu.au \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.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
all inboxes | Powered by JetHome®