* Should touchsticks really be relative input devices?
@ 2016-05-28 11:31 Ben Gamari
2016-05-30 1:39 ` Peter Hutterer
0 siblings, 1 reply; 2+ messages in thread
From: Ben Gamari @ 2016-05-28 11:31 UTC (permalink / raw)
To: Peter Hutterer, linux-input; +Cc: xorg
[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]
Hello input people,
Recently I've been bringing up the touchstick hardware in the Dell
Latitude E7470 and have noticed that the existing drivers for this sort
of input device typically expose EV_REL events. Unfortunately,
it seems that exposing the hardware in this way leads to some rather
unfortunate hacks. Namely, you find things like this in the Alps driver,
/*
* The x and y values tend to be quite large, and when used
* alone the trackstick is difficult to use. Scale them down
* to compensate.
*/
x /= 8;
y /= 8;
input_report_rel(dev, REL_X, x);
input_report_rel(dev, REL_Y, -y);
Seeing this made me think back to experiences with touchsticks in
previous Dell laptops, which require an annoyingly high force to begin
movement. This is presumably due to the fact that the bottom few bits of
resolution are being needlessly thrown away.
Unfortunately, it doesn't seem that relative devices currently have much
choice but to scale their input space; it seems there is no way for a
device to expose its "range" to user mode (as you might do with
input_set_abs_params in the case of an absolute device).
Honestly, it's not even clear to me that touchstick devices should
produce relative events. It seems like they are somewhere between a
touchpad and mouse. Like a mouse, there is no absolute mapping between
points in the input device space and the work space. However, like a
touchpad the input space is bounded.
Perhaps these devices should instead produce absolute events and be
marked with INPUT_PROP_POINTING_STICK so that user land code can produce
the expected relative behavior normalized to the range of the device.
Has this been considered in the past?
Alternatively, perhaps relative devices ought to also be able to expose
their range.
Regardless of what happens, it would be great if some guidance for
touchsticks could be added to the "Guidelines" section of the kernel's
Documentation/input/event-codes.txt.
Cheers,
Ben
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Should touchsticks really be relative input devices?
2016-05-28 11:31 Should touchsticks really be relative input devices? Ben Gamari
@ 2016-05-30 1:39 ` Peter Hutterer
0 siblings, 0 replies; 2+ messages in thread
From: Peter Hutterer @ 2016-05-30 1:39 UTC (permalink / raw)
To: Ben Gamari; +Cc: Hans de Goede, xorg, linux-input
On Sat, May 28, 2016 at 01:31:30PM +0200, Ben Gamari wrote:
>
> Hello input people,
>
> Recently I've been bringing up the touchstick hardware in the Dell
> Latitude E7470 and have noticed that the existing drivers for this sort
> of input device typically expose EV_REL events. Unfortunately,
> it seems that exposing the hardware in this way leads to some rather
> unfortunate hacks. Namely, you find things like this in the Alps driver,
>
> /*
> * The x and y values tend to be quite large, and when used
> * alone the trackstick is difficult to use. Scale them down
> * to compensate.
> */
> x /= 8;
> y /= 8;
>
> input_report_rel(dev, REL_X, x);
> input_report_rel(dev, REL_Y, -y);
>
> Seeing this made me think back to experiences with touchsticks in
> previous Dell laptops, which require an annoyingly high force to begin
> movement. This is presumably due to the fact that the bottom few bits of
> resolution are being needlessly thrown away.
>
> Unfortunately, it doesn't seem that relative devices currently have much
> choice but to scale their input space; it seems there is no way for a
> device to expose its "range" to user mode (as you might do with
> input_set_abs_params in the case of an absolute device).
>
> Honestly, it's not even clear to me that touchstick devices should
> produce relative events. It seems like they are somewhere between a
> touchpad and mouse. Like a mouse, there is no absolute mapping between
> points in the input device space and the work space. However, like a
> touchpad the input space is bounded.
>
> Perhaps these devices should instead produce absolute events and be
> marked with INPUT_PROP_POINTING_STICK so that user land code can produce
> the expected relative behavior normalized to the range of the device.
> Has this been considered in the past?
not really. basically an interesting idea and you'd end up treating them
like joysticks. but the thing with tracksticks is that you get relative
events from the hardware and without heaps of hand-collected tables
you won't know the range the trackstick supports. so the abs idea just won't
work.
We've been pushing properties into the udev hwdb to somewhat normalise the
motion and set the sensitivy so that the various sticks feel the same out of
the box. This is inherently problematic, without a standardised way to apply
force you can't be exact, even less so when you ask different users to pick
a sensitivity that provides "good movement at normal pressure"
good ideas to fix this are welcome, libinput's trackstick handling is one fo
the sore sports but short of the "expose everything as config knob" I
haven't seen good solutions yet. And that's an inherently bad solution, at
least for me as the maintainer :)
> Alternatively, perhaps relative devices ought to also be able to expose
> their range.
that would be interesting especially for the resolution parameter (min/max
doesn't make sense in relative devices). but you'll find that that value is
just not available for relativ devices. Very few mice for example will tell
you what their physical DPI is (and it's switchable in a lot of them anyway).
Cheers,
Peter
> Regardless of what happens, it would be great if some guidance for
> touchsticks could be added to the "Guidelines" section of the kernel's
> Documentation/input/event-codes.txt.
>
> Cheers,
>
> Ben
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-30 1:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-28 11:31 Should touchsticks really be relative input devices? Ben Gamari
2016-05-30 1:39 ` Peter Hutterer
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).