Commit Graph

701 Commits

Author SHA1 Message Date
Peter Hutterer
abcafeede7 xf86-input-evdev 2.11.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.11.0
2024-10-15 14:32:50 +10:00
Peter Hutterer
d893fc74d2 Map some specific high keycodes into the FK20-23 range
These mappings have been part of xkeyboard-config for over a decade and
the likely reason they were introduced is that the corresponding evdev
keycode is > 255.

Let's forcibly remap those in the driver here so the rest of the system
can switch to the real keycodes instead of having to map them to the
whatever X expects.

See https://github.com/systemd/systemd/pull/34325/

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/10>
2024-10-09 14:33:05 +10:00
Martin Rys
b9327e6b28 Swap Compose and Kana values to conform to USB HID spec
Should fix https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/204

Current state conflicts with XKB which defines them correctly.

NUM and CAPS are still incorrectly swapped, but it's equally wrong on
XKB's side and everywhere else, so it's just cosmetic and a breaking
change just to satisfy USB HID ordering is not worth it, since the keys
work fine this way anyway.

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/8>
2024-09-05 11:32:21 +10:00
Peter Hutterer
917c2ea204 gitlab CI: set the standard workflow rules for an fdo project 2024-09-03 13:49:04 +10:00
Enrico Weigelt, metux IT consult
b48c2b7028 dont spam xserver with false-positives
It's not necessary to spam the xserver log with error messages of
just temporary read failures that aren't actually errors.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/6>
2024-06-10 19:05:58 +02:00
Enrico Weigelt, metux IT consult
aac329fd2a fix FTBS on non-udev target platforms (eg. FreeBSD)
On platforms that don't have libudev at all (eg. FreeBSD), the build
breaks. The only consumer, EvdevDeviceIsVirtual(), can live well with
just bailing out directly if libudev isn't present.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/6>
2024-06-10 19:05:54 +02:00
Enrico Weigelt, metux IT consult
fbfb16edfe tolerate including linux/input.h
On some platforms (eg. FreeBSD) we're running into a name clash between
xf86str.h and linux/input.h. Since we don't actually need those symbols
here, an easy workaround is #undef'ing them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/6>
2024-06-10 18:42:22 +02:00
Enrico Weigelt, metux IT consult
409e8205e8 fix unportable linux-only include
including <linux/types.h> obviously isn't portable - instead using
<sys/types.h> is the right choice for us.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/6>
2024-06-10 18:38:12 +02:00
Enrico Weigelt, metux IT consult
7fc0d51f70 drop quirk for ancient linux kernel version (<2.6.30)
This kernel had been released 1.5 decades ago - probably no need to have
special quirks for such an ancient kernel version anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-10 18:05:40 +02:00
Enrico Weigelt, metux IT consult
7c48b6225b bump minimal xorg version to 1.18
1.18 was released a decade ago, so it seems reasonable stop supporting
older ones.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/5>
2024-05-14 10:59:46 +02:00
Alan Coopersmith
8edcb2b9e8 gitlab CI: ensure libtool is installed in build container
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-01 11:22:19 -07:00
Alan Coopersmith
84b2740814 gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09 12:06:53 -08:00
Alan Coopersmith
469a30f158 Convert src/draglock.c from ISO-8859-1 to UTF-8
Fixes flawfinder error in CI:
Error: encoding error in ./src/draglock.c
'utf-8' codec can't decode byte 0xa9 in position 343: invalid start byte

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-16 11:11:01 -08:00
Alan Coopersmith
23909c35a4 gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-16 10:55:36 -08:00
Alan Coopersmith
abf0fa611e Fix spelling/wording issues
Found by using:
    codespell --builtin clear,rare,usage,informal,code,names

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-16 10:51:03 -08:00
Alan Coopersmith
6609d352f3 Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-16 10:49:21 -08:00
Alan Coopersmith
71036116be Update configure.ac bug URL for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-25 12:45:55 -08:00
Alan Coopersmith
b6b36166bd Update README for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-18 11:30:58 -08:00
Peter Hutterer
67a97afbc0 evdev 2.10.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.10.6
2018-05-29 10:05:22 +10:00
Andrey Zabolotnyi
2fb95783e0 Fix generation of proximity-in/out events.
Invoking xf86PostProximityEvent with no valuators does nothing, so we
have to provide a valid valuator set to the call.

https://bugs.freedesktop.org/show_bug.cgi?id=104562

[whot: slight change from 104562
abs_vals is reset on every frame but old_vals is kept around to remember the
last value of the valuator (and is updated to the current values before
processing the frame). We expect the prox in to have x/y, so let's just
unconditionally use old_vals for proximity events.]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-29 10:00:26 +10:00
Peter Hutterer
456f23cbbd Ignore x/y axis changes on proximity out
Wacom tablets send a farewell reset to 0 on all axes when the tool goes out of
proximity. Ignore those so we can rely on our various valuator masks always
having the correct coordinates.

Possible false positive if you manage to go out of proximity right above the
zero datum but meh.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-29 10:00:05 +10:00
Christian Gmeiner
ab1d9adfd3 Print cause of a failed open(..) call
This is quite helpful for debugging.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-30 13:37:57 +10:00
Andrey Zabolotnyi
192fdb0690 Fix handling of devices with only buttons (e.g. tablet pads).
When transforming 'only buttons' device into a pseudo-mouse by adding
relative X and Y axes, EVDEV_RELATIVE_EVENTS flag  must be set on device,
otherwise it gets classified as a keyboard by X11.

https://bugs.freedesktop.org/show_bug.cgi?id=104630

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-16 16:30:59 +10:00
Mihail Konev
8c1058f2eb autogen: add default patch prefix
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26 14:00:21 +10:00
Emil Velikov
4921912374 autogen.sh: use quoted string variables
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
fall-outs, when they contain space.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26 11:13:25 +10:00
Peter Hutterer
67681097b8 autogen.sh: use exec instead of waiting for configure to finish
Syncs the invocation of configure with the one from the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-01-26 11:13:25 +10:00
Peter Hutterer
1dd61111ad evdev 2.10.5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.10.5
2017-01-18 13:14:29 +10:00
Alexander Volkov
231061d004 Don't send pointer events in addition to touch events
Updating abs_vals for touch events since d24431a186
leads to posting Motion events with updated coordinates to the X server,
which in turn resends them to clients.

Don't queue Motion events for touch events, the X server should
synthesize them itself.

Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-03 11:28:17 +10:00
David Strobach
425ed6017a Middle emulation - make the emulated button number configurable
Sometimes it may be desirable to remap physical middle button
to something else and use emulation instead. The emulation is
however hardcoded to emulate physical button 2, so the emulated
button gets remapped together with the physical one. This patch
adds the Emulate3Button configuration option to allow for user
selection of the emulated button number and a configuration
like this:

Section "InputClass"
    Identifier "Middle button emulation config"
    MatchProduct ".... some device ..."
    MatchDriver "evdev"
    Option "Emulate3Buttons" "on"
    Option "Emulate3Button" "9"
EndSection

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-11-21 15:26:58 +10:00
Peter Hutterer
7251e42dfb Fix off-by-one error counting axes
We stopped counting one too early, but still initialized that axis later,
leading to a bug macro to trigger.

https://bugs.freedesktop.org/show_bug.cgi?id=97956

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-10-24 08:27:24 +10:00
Peter Hutterer
551db5b86e evdev 2.10.4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.10.4
2016-10-01 17:49:10 +10:00
Keith Packard
bb8bde7456 Support XINPUT ABI 24 (remove select mask from block/wakeup handlers)
The evdev driver wasn't using the select mask arguments, so this
change just involves adjusting the argument lists.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-06 13:51:21 +10:00
Keith Packard
7b1267f7f1 Support XINPUT ABI version 23 (threaded input)
Use input_lock/input_unlock calls instead of SIGIO functions

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-02 09:42:05 +10:00
Keith Packard
e08b033276 Report errors when attempting to write keyboard controls
This is mostly to eliminate a compiler warning.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-02 09:41:25 +10:00
Peter Hutterer
7c1971d9e7 evdev 2.10.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.10.3
2016-06-01 11:41:03 +10:00
Peter Hutterer
9a6952dafe Restore non-xy axes updates
This broke in d24431a186 Restore wheel emulation for absolute devices,
last hunk when the valuator update was moved to before any early exit
condition. But that new update only applies to valuator maps < 2, i.e. x/y
only. Other valuators are now ignored and remain on 0 forever.

Restore the valuator update.

https://bugs.freedesktop.org/show_bug.cgi?id=95315

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-12 15:29:55 +10:00
Peter Hutterer
f12eca9f83 evdev 2.10.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.10.2
2016-04-29 09:13:35 +10:00
Peter Hutterer
33dc3d7128 Prevent buffer overrun accessing btn_labels
We go up to BTN_JOYSTICK, hence group can have a value of up to including 15.
The actual btn_labels only has 6 elements though.

Found by coverity.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-27 09:11:03 +10:00
Peter Hutterer
7b0a65d989 Don't reset the other axis on wheel emulation scroll buildup
The idea was that of a direction lock: as we move vertically we should not
build up any horizontal scroll motion even if we move slightly diagonally.

The effect was though that the axis would be reset completely as soon as an
event from the other axis occured. With the default threshold of 10, if one in
ten events was a REL_X, we'd never get a wheel event.

Drop this code, it's not needed. By default wheel emulation doesn't do
horizontal scrolling, if a config snippet sets XAxisMapping the user wants
horizontal scrolling. And since we just add the value anyway, as long as the
user does a roughly vertical motion we won't get over the threshold anyway.

https://bugs.freedesktop.org/show_bug.cgi?id=93617

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-20 10:48:36 +10:00
Peter Hutterer
d24431a186 Restore wheel emulation for absolute devices
Wheel emulation relies on oldVals, which stopped updating in 3dcf6f123c.

Since wheel emulation may filter the abs event, store the event before we do
anything with it. If we really want the abs_event, abs_queued will be set to
1, otherwise the value will be ignored.

And now that we know abs_value is always valied, we can copy its value into
old_vals, so that wheel emulation can calculate the delta correctly.

https://bugs.freedesktop.org/show_bug.cgi?id=93617

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-20 10:48:35 +10:00
Peter Hutterer
ce7d8fdebc man: add a warning that wheel emu inertia must be set and it isn't inertia
First, it's not actually inertia, it's simply the scroll distance, yay for the
misnomer.

And it needs to be set for any device that is more fine-grained than a
mouse, especially absolute devices. For example the VirtualBox device has an
abs max of 32767, so a simple motion may have a delta of to 2000 units and
that results in 200 scroll events. That's a bit excessive.

Related to: https://bugs.freedesktop.org/show_bug.cgi?id=93617

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-14 11:53:56 +10:00
Peter Hutterer
6a3beab613 evdev 2.10.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.10.1
2016-01-08 15:11:59 +10:00
Peter Hutterer
d7e61a7074 Only map x and y to axes 0 and 1
The Logitech G600 has one device with all axes north of ABS_MISC. The current
code assigns ABS_MISC as first axis to map to axis 0, i.e. x. On button press,
one node sends the BTN_LEFT but the other node sends an ABS_MISC with a 1 0
value. ABS_MISC is mapped to axis 0, this moves the pointer to (0, y) on
every button click.

Avoid this by simply mapping any axis other than x/y to at least axis 3, and
make sure we only override the MT 0/1 axes when we actually have MT axes.

https://bugs.freedesktop.org/show_bug.cgi?id=92856

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-11-13 06:50:28 +10:00
Peter Hutterer
01e7ac4854 evdev 2.10.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.10.0
2015-10-28 14:28:20 +10:00
Thomas Hindoe Paaboel Andersen
034be31159 Add "Resolution" option for mice to the evdev driver
It can be used to scale the resolution of a mouse to that of a 1000 DPI
mouse. This can be useful to make high resolution mice less sensitive
without turning off acceleration. The target of 1000 DPI is used as the
same default is used in libinput. If the option is not set no scaling
will be done.

https://bugs.freedesktop.org/show_bug.cgi?id=88134
Signed-off-by: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-27 14:59:27 +10:00
Peter Hutterer
66c9978864 Add the default evdev config
This used to be part of the server but now that we have two drivers doing the
same thing (libinput, evdev) shift the configuration defaults to the driver.
This way you get what you install.

https://bugs.freedesktop.org/show_bug.cgi?id=89023

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-05-18 13:39:37 +10:00
Peter Hutterer
0d3494eadf Bump to 2.9.99
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-27 11:41:50 +10:00
Peter Hutterer
56a5e67162 Unconditionally require mtdev
Missing from 2c9f4f0380

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-16 07:57:38 +10:00
Peter Hutterer
74433f788a Always check for a return value on creating a property
Mostly to make static analyzers happy

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-16 07:57:26 +10:00
Peter Hutterer
fdc33809de Invert a condition to reduce nesting
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-13 10:58:01 +10:00