Compare commits

...

66 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
8bdf7f1d44 configure.ac: use AC_CONFIG_FILES() macro
passing output file names directly to AC_OUTPUT() is deprecated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-12 12:15:59 +01:00
Enrico Weigelt, metux IT consult
f32592af5b configure.ac: query input_drivers_dir from xlibre-server.pc
Use new pkg-config name and variable for retrieving the input
driver installation directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-12 09:11:29 +01:00
Enrico Weigelt, metux IT consult
3c37d58f21 man: use autoconf instead of extra sed run
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-08 16:56:17 +01:00
Enrico Weigelt, metux IT consult
83d7cfecfd replace obsolete "pointer" typedef by void*
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-02 18:03:28 +01:00
Enrico Weigelt, metux IT consult
93d89e4374 .github: update action version
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-30 15:45:35 +01:00
Enrico Weigelt, metux IT consult
87f04d892f .github: add freebsd and dragonfly bsd build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-27 14:19:17 +01:00
Enrico Weigelt, metux IT consult
173cdfa20a .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-23 10:09:07 +01:00
polaris
4d30b39c0a configure.ac: make libudev optional 2025-12-22 22:20:26 +01:00
Enrico Weigelt, metux IT consult
0f8cbdff4f configure.ac: query xserver directories via pkg-config
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 17:01:10 +01:00
Enrico Weigelt, metux IT consult
77129e1138 evdev-properties: drop unused EVDEV_PROP_REOPEN
Not used for 16 years now. See 59056e656c.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:25:50 +01:00
Enrico Weigelt, metux IT consult
114073c225 don't install header file anymore
Nothing's compiling against this driver, so it shouldn't install
header files. If these constants are considered a public spec,
then they should go to some appropriate proto package.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:25:48 +01:00
Enrico Weigelt, metux IT consult
13fb800c0c drop compat with xserver < 24.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:13:01 +01:00
Enrico Weigelt, metux IT consult
cfac96b809 drop compat with Xserver < 21.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:09:52 +01:00
Enrico Weigelt, metux IT consult
5c74de60b3 drop compat with ancient xservers
Relying on xserver >= 1.18, which has XINPUT 22.1

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:08:12 +01:00
Enrico Weigelt, metux IT consult
679c6cb77f configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:05:38 +01:00
Enrico Weigelt, metux IT consult
298e61e566 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 18:24:09 +01:00
Enrico Weigelt, metux IT consult
1a80d31ed7 configure.ac: tiny formatting cleanups
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 18:23:38 +01:00
Enrico Weigelt, metux IT consult
e8a08514f6 drop obsolete #ifdef HAVE_CONFIG_H
config.h is always present

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 18:55:18 +01:00
Enrico Weigelt, metux IT consult
a413634da8 replace DRIVER_NAME autotools symbol by fixed string
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 18:49:52 +01:00
Enrico Weigelt, metux IT consult
0eb641f218 drop xorg-evdec.pc
Nothing's ever trying to compile against the driver, so no
pkgconfig descriptor needed here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 18:43:47 +01:00
Enrico Weigelt, metux IT consult
c59ba05346 drop .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 18:39:12 +01:00
Enrico Weigelt, metux IT consult
0981f96cdc man: replace Xorg by XLibre
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:40:10 +01:00
Enrico Weigelt, metux IT consult
b1320d6f02 README.md: fix URLs
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 12:22:27 +01:00
Enrico Weigelt, metux IT consult
26dde8fc21 release 2.11.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 13:28:10 +01:00
Enrico Weigelt, metux IT consult
51d93c47f7 configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 13:22:48 +01:00
Enrico Weigelt, metux IT consult
3801a36ec9 emuWheel: use strdup() instead of xstrdup()
Never passing NULL here, so no need to call xstrdup() / Xstrdup()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 19:06:32 +01:00
SuperPuiu
e361cfad9f Transform an if-else statement into a conditional operator
Signed-off-by: SuperPuiu <SuperPuiu@proton.me>
2025-07-29 19:00:18 +02:00
b-aaz
4570407894 configure: Automatically detect the default xorg-module-dir.
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
2025-07-29 18:54:05 +02:00
Enrico Weigelt, metux IT consult
9ee18e3450 .github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable
release as well as current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-28 20:04:48 +02:00
callmetango
e518cb19bd .github: Add issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-07 17:00:04 +02:00
Alan Coopersmith
0b5b97bc6b man page: Replace __xservername__ & __xconfigfile__ with Xorg & xorg.conf
These were originally to allow distros to build using XFree86 & XF86config
names, but we haven't supported that in nearly two decades now.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/13>
2025-06-01 15:33:56 -07:00
Alan Coopersmith
96a4dc7565 Improve man page formatting
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html
and fix warnings raised by  `mandoc -T lint` and `groff -rCHECKSTYLE=10`

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/13>
2025-05-31 15:53:11 -07:00
Peter Hutterer
abcafeede7 xf86-input-evdev 2.11.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
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>
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>
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
28 changed files with 839 additions and 508 deletions

View File

@@ -0,0 +1,65 @@
name: 🐞 Bug report
description: Create a report to help us improve
labels: [bug, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help everyone identify and fix the bug. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: dropdown
id: affected-version
attributes:
label: Select the version
options:
- 2.11.0.1
- Git master branch
- other or don't know
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe your issue
placeholder: When I did X then Y happened.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Start ...
2. Do this
3. Do that
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
placeholder: I expected this to happen.
- type: textarea
id: environment
attributes:
label: Additional Information
description: |
Additional information you want to provide such as logs, system info, environment, screenshots, etc.
placeholder: |
Add any other context about the bug here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-evdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for reporting this issue! We will get back to you as soon as possible.

View File

@@ -0,0 +1,49 @@
name: ✨ Feature request
description: Suggest a feature for this software
labels: [enhancement, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the new software feature you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the feature"
placeholder: A thing in X that allows to do Y.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as references to related issues or protocols, the implications on existing use cases, etc.
placeholder: |
Add any other context about the feature request here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-evdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for your suggestion! Let's see together if it can be done.

View File

@@ -0,0 +1,49 @@
name: 🔧 Code cleanup
description: Level up the source code
labels: [code-cleanup, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the code cleanup you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the cleanup"
placeholder: C in X needs to be changed into D.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Having D is needed for E.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as implications on existing code, how to ensure API/ABI stability, which tests are needed or to be run, related issues, etc.
placeholder: |
Add any other context about the cleanup here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-evdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for looking at the source code! Let's see together how it can be improved.

View File

@@ -0,0 +1,38 @@
name: 🔖 Documentation update
description: Make your mark for better documentation
labels: [documentation, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help others understand our software. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the update
placeholder: These things need to be better documented.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as tickets related to changes in the software, affected files, screenshots, etc.
placeholder: |
Add any other context about the update here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-evdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for requesting this update! We will get back to you as soon as possible.

43
.github/ISSUE_TEMPLATE/05-org-task.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: ✅ Organizational task
description: Create a task for project organization
labels: [needs-triage, organization]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to get organizational things done. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the task
placeholder: These things need to be done.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as the context for bigger tasks, the implicatons on existing workflows, related issues, etc.
placeholder: |
Add any other context about the task here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-evdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for adding this task! We will get back to you as soon as possible.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: XLibre Community Support
url: https://github.com/orgs/X11Libre/discussions
about: Please ask and answer questions here.
- name: Mailing List
url: https://www.freelists.org/list/xlibre
about: You can join the discussions on our mailing list.

50
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
permissions:
contents: write
on:
push:
pull_request:
jobs:
ubuntu:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/ubuntu@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
freebsd:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/freebsd@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
dragonfly:
strategy:
matrix:
# xlibre-xserver-25.0.x not compiling on dragonfly yet
xserver-version: [ master, xlibre-xserver-25.1.0 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/dragonfly@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
# Not supported on NetBSD
release-notes:
name: Release pushed tag
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
needs: [ ubuntu, freebsd, dragonfly ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: X11Libre/action-build-driver/release@v0.3.7

2
.gitignore vendored
View File

@@ -76,3 +76,5 @@ core
# Edit the following section as needed # Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore' # For example, !report.pc overrides *.pc. See 'man gitignore'
# #
man/evdev.4
man/evdev.man

View File

@@ -19,15 +19,13 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Provide an sdk location that is writable by the evdev module # During distcheck, system locations (as provided by pkg-config) may
DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' # not be writable; provide instead relative locations.
DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules'
SUBDIRS = src man include SUBDIRS = src man
MAINTAINERCLEANFILES = ChangeLog INSTALL MAINTAINERCLEANFILES = ChangeLog INSTALL
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-evdev.pc
dist_xorgconf_DATA = 10-evdev.conf dist_xorgconf_DATA = 10-evdev.conf
.PHONY: ChangeLog INSTALL .PHONY: ChangeLog INSTALL
@@ -39,3 +37,5 @@ ChangeLog:
$(CHANGELOG_CMD) $(CHANGELOG_CMD)
dist-hook: ChangeLog INSTALL dist-hook: ChangeLog INSTALL
EXTRA_DIST = README.md

20
README
View File

@@ -1,20 +0,0 @@
xf86-input-evdev - Generic Linux input driver for the Xorg X server
Please submit bugs & patches to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/driver/xf86-input-evdev
http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

8
README.md Normal file
View File

@@ -0,0 +1,8 @@
xf86-input-evdev - Generic Linux input driver for the XLibre X server
---------------------------------------------------------------------
The primary development code repository can be found at:
https://github.com/X11Libre/xf86-input-evdev
Please submit bug reports and requests to merge patches there.

View File

@@ -1,14 +1,17 @@
#! /bin/sh #! /bin/sh
srcdir=`dirname $0` srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=. test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd` ORIGDIR=`pwd`
cd $srcdir cd "$srcdir"
autoreconf -v --install || exit 1 autoreconf -v --install || exit 1
cd $ORIGDIR || exit $? cd "$ORIGDIR" || exit $?
git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
git config --local format.subjectPrefix "PATCH xf86-input-evdev"
if test -z "$NOCONFIGURE"; then if test -z "$NOCONFIGURE"; then
$srcdir/configure "$@" exec "$srcdir"/configure "$@"
fi fi

View File

@@ -22,16 +22,16 @@
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([xf86-input-evdev], AC_INIT([xlibre-xf86-input-evdev],
[2.10.3], [25.0.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [https://github.com/X11Libre/xf86-input-evdev/issues],
[xf86-input-evdev]) [xlibre-xf86-input-evdev])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.) AC_CONFIG_AUX_DIR(.)
# Initialize Automake # Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_INIT_AUTOMAKE([foreign dist-xz])
# Initialize libtool # Initialize libtool
AC_DISABLE_STATIC AC_DISABLE_STATIC
@@ -44,43 +44,22 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS XORG_DEFAULT_OPTIONS
# Obtain compiler/linker options from server and required extensions # Obtain compiler/linker options from server and required extensions
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.12] xproto [inputproto >= 2.1.99.3]) PKG_CHECK_MODULES(XORG, [xorg-server >= 25.0.0] xproto [inputproto >= 2.1.99.3])
PKG_CHECK_MODULES(UDEV, libudev) PKG_CHECK_MODULES(UDEV, libudev,
[HAVE_UDEV=yes], [HAVE_UDEV=no])
AS_IF([test "$HAVE_UDEV" = "yes"],
[AC_DEFINE([HAVE_LIBUDEV], [1], [Define if libudev is available])])
PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4]) PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
PKG_CHECK_MODULES(MTDEV, mtdev) PKG_CHECK_MODULES(MTDEV, mtdev)
# Define a configure option for an alternate input module directory # Define a configure option for an alternate input module directory
AC_ARG_WITH(xorg-module-dir, PKG_PROG_PKG_CONFIG([0.25])
AC_HELP_STRING([--with-xorg-module-dir=DIR], xlibre_input_drivers_dir=`$PKG_CONFIG --variable=input_drivers_dir xlibre-server`
[Default xorg module directory [[default=$libdir/xorg/modules]]]), AC_SUBST(xlibre_input_drivers_dir)
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
inputdir=${moduledir}/input
AC_SUBST(inputdir)
AC_ARG_WITH(xorg-conf-dir, xorgconfdir=`$PKG_CONFIG --variable=sysconfigdir xorg-server`
AC_HELP_STRING([--with-xorg-conf-dir=DIR],
[Default xorg.conf.d directory [[default=$prefix/share/X11/xorg.conf.d/]]]),
[xorgconfdir="$withval"],
[xorgconfdir="$prefix/share/X11/xorg.conf.d"])
AC_SUBST(xorgconfdir) AC_SUBST(xorgconfdir)
# X Server SDK location is required to install evdev header files AC_CONFIG_FILES([Makefile src/Makefile man/Makefile man/evdev.man])
# This location is also relayed in the xorg-evdev.pc file
sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
# Workaround overriding sdkdir to be able to create a tarball when user has no
# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
AC_SUBST([sdkdir])
DRIVER_NAME=evdev
AC_SUBST([DRIVER_NAME])
AC_CONFIG_FILES([Makefile
src/Makefile
man/Makefile
include/Makefile
xorg-evdev.pc])
AC_OUTPUT AC_OUTPUT

View File

@@ -1 +0,0 @@
sdk_HEADERS = evdev-properties.h

View File

@@ -33,6 +33,8 @@
#define EVDEV_PROP_MIDBUTTON "Evdev Middle Button Emulation" #define EVDEV_PROP_MIDBUTTON "Evdev Middle Button Emulation"
/* CARD32 */ /* CARD32 */
#define EVDEV_PROP_MIDBUTTON_TIMEOUT "Evdev Middle Button Timeout" #define EVDEV_PROP_MIDBUTTON_TIMEOUT "Evdev Middle Button Timeout"
/* CARD8 */
#define EVDEV_PROP_MIDBUTTON_BUTTON "Evdev Middle Button Button"
/* Wheel emulation */ /* Wheel emulation */
/* BOOL */ /* BOOL */
@@ -54,10 +56,6 @@
/* BOOL, 2 values [x, y], 1 inverts axis */ /* BOOL, 2 values [x, y], 1 inverts axis */
#define EVDEV_PROP_INVERT_AXES "Evdev Axis Inversion" #define EVDEV_PROP_INVERT_AXES "Evdev Axis Inversion"
/* Reopen attempts. */
/* CARD8 */
#define EVDEV_PROP_REOPEN "Evdev Reopen Attempts" /* OBSOLETE */
/* Run-time calibration */ /* Run-time calibration */
/* CARD32, 4 values [minx, maxx, miny, maxy], or no values for unset */ /* CARD32, 4 values [minx, maxx, miny, maxy], or no values for unset */
#define EVDEV_PROP_CALIBRATION "Evdev Axis Calibration" #define EVDEV_PROP_CALIBRATION "Evdev Axis Calibration"

View File

@@ -1,37 +1,7 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
drivermandir = $(DRIVER_MAN_DIR) drivermandir = $(DRIVER_MAN_DIR)
driverman_DATA = evdev.$(DRIVER_MAN_SUFFIX)
driverman_PRE = $(DRIVER_NAME).man
driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
EXTRA_DIST = $(DRIVER_NAME).man
CLEANFILES = $(driverman_DATA) CLEANFILES = $(driverman_DATA)
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(DRIVER_MAN_SUFFIX): .man.$(DRIVER_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ cp $< $@

View File

@@ -1,307 +0,0 @@
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH EVDEV __drivermansuffix__ __vendorversion__
.SH NAME
evdev \- Generic Linux input driver
.SH SYNOPSIS
.nf
.B "Section \*qInputDevice\*q"
.BI " Identifier \*q" devname \*q
.B " Driver \*qevdev\*q"
.BI " Option \*qDevice\*q \*q" devpath \*q
.BI " Option \*qEmulate3Buttons\*q \*q" True \*q
.BI " Option \*qEmulate3Timeout\*q \*q" 50 \*q
.BI " Option \*qGrabDevice\*q \*q" False \*q
\ \ ...
.B EndSection
.fi
.SH DESCRIPTION
.B evdev
is an __xservername__ input driver for Linux\'s generic event devices. It
therefore supports all input devices that the kernel knows about, including
most mice, keyboards, tablets and touchscreens.
.B evdev
is the default driver on the major Linux distributions.
.PP
The
.B evdev
driver can serve as both a pointer and a keyboard input device. Multiple
input devices are supported by multiple instances of this driver, with one
InputDevice section of your __xconfigfile__ for each input device that will
use this driver.
.PP
It is recommended that
.B evdev
devices are configured through the
.B InputClass
directive (refer to __xconfigfile__(__filemansuffix__)) instead of manual
per-device configuration. Devices configured in the
__xconfigfile__(__filemansuffix__) are not hot-plug capable.
.PP
.SH SUPPORTED HARDWARE
In general, any input device that the kernel has a driver for can be accessed
through the
.B evdev
driver. See the Linux kernel documentation for a complete list.
.PP
.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details and for options that can be used with all input drivers. This
section only covers configuration details specific to this driver.
.PP
The following driver
.B Options
are supported:
.TP 7
.BI "Option \*qButtonMapping\*q \*q" string \*q
Sets the button mapping for this device. The mapping is a space-separated list
of button mappings that correspond in order to the physical buttons on the
device (i.e. the first number is the mapping for button 1, etc.). The default
mapping is "1 2 3 ... 32". A mapping of 0 deactivates the button. Multiple
buttons can have the same mapping.
For example, a left-handed mouse with deactivated scroll-wheel would use a
mapping of "3 2 1 0 0". Invalid mappings are ignored and the default mapping
is used. Buttons not specified in the user's mapping use the default mapping.
.TP 7
.BI "Option \*qDevice\*q \*q" string \*q
Specifies the device through which the device can be accessed. This will
generally be of the form \*q/dev/input/eventX\*q, where X is some integer.
The mapping from device node to hardware is system-dependent. Property:
"Device Node" (read-only).
.TP 7
.BI "Option \*qDragLockButtons\*q \*q" "L1 B2 L3 B4" \*q
Sets \*qdrag lock buttons\*q that simulate holding a button down, so
that low dexterity people do not have to hold a button down at the
same time they move a mouse cursor. Button numbers occur in pairs,
with the lock button number occurring first, followed by the button
number that is the target of the lock button. Property: "Evdev
Drag Lock Buttons".
.TP 7
.BI "Option \*qDragLockButtons\*q \*q" "M1" \*q
Sets a \*qmaster drag lock button\*q that acts as a \*qMeta Key\*q
indicating that the next button pressed is to be
\*qdrag locked\*q. Property: "Evdev Drag Lock Buttons".
.TP 7
.TP 7
.BI "Option \*qEmulate3Buttons\*q \*q" boolean \*q
Enable/disable the emulation of the third (middle) mouse button for mice
which only have two physical buttons. The third button is emulated by
pressing both buttons simultaneously. Default: off. Property: "Evdev Middle
Button Emulation".
.TP 7
.BI "Option \*qEmulate3Timeout\*q \*q" integer \*q
Sets the timeout (in milliseconds) that the driver waits before deciding
if two buttons where pressed "simultaneously" when 3 button emulation is
enabled. Default: 50. Property: "Evdev Middle Button Timeout".
.TP 7
.BI "Option \*qEmulateWheel\*q \*q" boolean \*q
Enable/disable "wheel" emulation. Wheel emulation means emulating button
press/release events when the mouse is moved while a specific real button
is pressed. Wheel button events (typically buttons 4 and 5) are
usually used for scrolling. Wheel emulation is useful for getting wheel-like
behaviour with trackballs. It can also be useful for mice with 4 or
more buttons but no wheel. See the description of the
.BR EmulateWheelButton ,
.BR EmulateWheelInertia ,
.BR EmulateWheelTimeout ,
.BR XAxisMapping ,
and
.B YAxisMapping
options. Default: off. Property "Evdev Wheel Emulation".
.TP 7
.BI "Option \*qEmulateWheelButton\*q \*q" integer \*q
Specifies which button must be held down to enable wheel emulation mode.
While this button is down, X and/or Y pointer movement will generate button
press/release events as specified for the
.B XAxisMapping
and
.B YAxisMapping
settings. If the button is 0 and
.BR EmulateWheel
is on, any motion of the device is converted into wheel events. Default: 4.
Property: "Evdev Wheel Emulation Button".
.TP 7
.BI "Option \*qEmulateWheelInertia\*q \*q" integer \*q
Specifies how far (in pixels) the pointer must move to generate button
press/release events in wheel emulation mode. Default: 10. Property: "Evdev
Wheel Emulation Inertia".
.IP
This value must be set for any device does not resemble a standard mouse.
Specifically, on absolute devices such as tablets the value should be set to
a reasonable fraction of the expected movement to avoid excess scroll events.
.IP
.B WARNING:
the name \*qinertia\*q is a misnomer. This option defines the distance
required to generate one scroll event similar to the
.B VertScrollDelta
and
.B HorizScrollDelta
options. It does not enable inertia in the
physical sense, scrolling stops immediately once the movement has stopped.
.TP 7
.BI "Option \*qEmulateWheelTimeout\*q \*q" integer \*q
Specifies the time in milliseconds the
.BR EmulateWheelButton
must be pressed before wheel emulation is started. If the
.BR EmulateWheelButton
is released before this timeout, the original button press/release event
is sent. Default: 200. Property: "Evdev Wheel Emulation Timeout".
.TP 7
.BI "Option \*qEmulateThirdButton\*q \*q" boolean \*q
Enable third button emulation. Third button emulation emits a right button
event (by default) by pressing and holding the first button. The first
button must be held down for the configured timeout and must not move more
than the configured threshold for the emulation to activate. Otherwise, the
first button event is posted as normal. Default: off. Property: "Evdev
Third Button Emulation".
.TP 7
.BI "Option \*qEmulateThirdButtonTimeout\*q \*q" integer \*q
Specifies the timeout in milliseconds between the initial button press and
the generation of the emulated button event.
Default: 1000. Property: "Evdev Third Button Emulation Timeout".
.TP 7
.BI "Option \*qEmulateThirdButtonButton\*q \*q" integer \*q
Specifies the physical button number to be emitted if third button emulation
is triggered.
Default: 3. Property: "Evdev Third Button Button".
.TP 7
.BI "Option \*qEmulateThirdButtonMoveThreshold\*q \*q" integer \*q
Specifies the maximum move fuzz in device coordinates for third button
emulation. If the device moves by more than this threshold before the third
button emulation is triggered, the emulation is cancelled and a first button
event is generated as normal.
Default: 20. Property: "Evdev Third Button Emulation Threshold".
.TP 7
.BI "Option \*qGrabDevice\*q \*q" boolean \*q
Force a grab on the event device. Doing so will ensure that no other driver
can initialise the same device and it will also stop the device from sending
events to /dev/kbd or /dev/input/mice. Events from this device will not be
sent to virtual devices (e.g. rfkill or the Macintosh mouse button emulation).
Default: disabled.
.TP 7
.BI "Option \*qInvertX\*q \*q" Bool \*q
.TP 7
.BI "Option \*qInvertY\*q \*q" Bool \*q
Invert the given axis. Default: off. Property: "Evdev Axis Inversion".
.TP 7
.BI "Option \*qIgnoreRelativeAxes\*q \*q" Bool \*q
.TP 7
.BI "Option \*qIgnoreAbsoluteAxes\*q \*q" Bool \*q
Ignore the specified type of axis. Default: unset. The X server cannot deal
with devices that have both relative and absolute axes. Evdev tries to guess
wich axes to ignore given the device type and disables absolute axes for
mice and relative axes for tablets, touchscreens and touchpad. These options
allow to forcibly disable an axis type. Mouse wheel axes are exempt and will
work even if relative axes are ignored. No property, this configuration must
be set in the configuration.
.br
If either option is set to False, the driver will not ignore the specified
axes regardless of the presence of other axes. This may trigger buggy
behavior and events from this axis are always forwarded. Users are
discouraged from setting this option.
.TP 7
.BI "Option \*qCalibration\*q \*q" "min-x max-x min-y max-y" \*q
Calibrates the X and Y axes for devices that need to scale to a different
coordinate system than reported to the X server. This feature is required
for devices that need to scale to a different coordinate system than
originally reported by the kernel (e.g. touchscreens). The scaling to the
custom coordinate system is done in-driver and the X server is unaware of
the transformation. Property: "Evdev Axis Calibration".
.TP 7
.B Option \*qMode\*q \*qRelative\*q\fP|\fP\*qAbsolute\*q
Sets the mode of the device if device has absolute axes.
The default value for touchpads is relative, for other absolute.
This option has no effect on devices without absolute axes.
.TP 7
.BI "Option \*qSwapAxes\*q \*q" Bool \*q
Swap x/y axes. Default: off. Property: "Evdev Axes Swap".
.TP 7
.BI "Option \*qXAxisMapping\*q \*q" "N1 N2" \*q
Specifies which buttons are mapped to motion in the X direction in wheel
emulation mode. Button number
.I N1
is mapped to the negative X axis motion and button number
.I N2
is mapped to the positive X axis motion. Default: no mapping. Property:
"Evdev Wheel Emulation Axes".
.TP 7
.BI "Option \*qYAxisMapping\*q \*q" "N1 N2" \*q
Specifies which buttons are mapped to motion in the Y direction in wheel
emulation mode. Button number
.I N1
is mapped to the negative Y axis motion and button number
.I N2
is mapped to the positive Y axis motion. Default: "4 5". Property:
"Evdev Wheel Emulation Axes".
.TP 7
.BI "Option \*qTypeName\*q \*q"type"\*q
Specify the X Input 1.x type (see XListInputDevices(__libmansuffix__)).
There is rarely a need to use this option, evdev will guess the device type
based on the device's capabilities. This option is provided for devices that
need quirks.
.TP 7
.BI "Option \*qVertScrollDelta\*q \*q" integer \*q
The amount of motion considered one unit of scrolling vertically.
Default: "1". Property: "Evdev Scrolling Distance".
.TP 7
.BI "Option \*qHorizScrollDelta\*q \*q" integer \*q
The amount of motion considered one unit of scrolling horizontally.
Default: "1". Property: "Evdev Scrolling Distance".
.TP 7
.BI "Option \*qDialDelta\*q \*q" integer \*q
The amount of motion considered one unit of turning the dial. Default: "1".
Property: "Evdev Scrolling Distance".
.TP 7
.BI "Option \*qResolution\*q \*q" integer \*q
Sets the resolution of the device in dots per inch. The resolution is used
to scale relative motion events from mouse devices to 1000 DPI resolution. This
can be used to make high resolution mice less sensitive without turning off
acceleration. If set to 0 no scaling will be performed. Default: "0".
.SH SUPPORTED PROPERTIES
The following properties are provided by the
.B evdev
driver.
.TP 7
.BI "Evdev Axis Calibration"
4 32-bit values, order min-x, max-x, min-y, max-y or 0 values to disable
in-driver axis calibration.
.TP 7
.BI "Evdev Axis Inversion"
2 boolean values (8 bit, 0 or 1), order X, Y. 1 inverts the axis.
.TP 7
.BI "Evdev Axes Swap"
1 boolean value (8 bit, 0 or 1). 1 swaps x/y axes.
.TP 7
.BI "Evdev Drag Lock Buttons"
8-bit. Either 1 value or pairs of values. Value range 0-32, 0 disables a
value.
.TP 7
.BI "Evdev Middle Button Emulation"
1 boolean value (8 bit, 0 or 1).
.TP 7
.BI "Evdev Middle Button Timeout"
1 16-bit positive value.
.TP 7
.BI "Evdev Wheel Emulation"
1 boolean value (8 bit, 0 or 1).
.TP 7
.BI "Evdev Wheel Emulation Axes"
4 8-bit values, order X up, X down, Y up, Y down. 0 disables a value.
.TP 7
.BI "Evdev Wheel Emulation Button"
1 8-bit value, allowed range 0-32, 0 disables the button.
.TP 7
.BI "Evdev Wheel Emulation Inertia"
1 16-bit positive value.
.TP 7
.BI "Evdev Wheel Emulation Timeout"
1 16-bit positive value.
.TP 7
.BI "Evdev Scrolling Distance"
3 32-bit values: vertical, horizontal and dial.
.SH AUTHORS
Kristian Høgsberg, Peter Hutterer
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)

369
man/evdev.man.in Normal file
View File

@@ -0,0 +1,369 @@
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH EVDEV @DRIVER_MAN_SUFFIX@ 2016-11-17 "@PACKAGE_STRING@" "X Version 11"
.SH NAME
evdev \- Generic Linux input driver for XLibre
.SH SYNOPSIS
.nf
.B "Section \*qInputDevice\*q"
.BI " Identifier \*q" devname \*q
.B " Driver \*qevdev\*q"
.BI " Option \*qDevice\*q \*q" devpath \*q
.BI " Option \*qEmulate3Buttons\*q \*q" True \*q
.BI " Option \*qEmulate3Timeout\*q \*q" 50 \*q
.BI " Option \*qGrabDevice\*q \*q" False \*q
\ \ ...
.B EndSection
.fi
.SH DESCRIPTION
.B evdev
is an XLibre input driver for Linux\'s generic event devices.
It therefore supports all input devices that the kernel knows about,
including most mice, keyboards, tablets, and touchscreens.
.B evdev
is the default driver on the major Linux distributions.
.PP
The
.B evdev
driver can serve as both a pointer and a keyboard input device.
Multiple input devices are supported by multiple instances of this driver,
with one InputDevice section of your xorg.conf for each input device
that will use this driver.
.PP
It is recommended that
.B evdev
devices are configured through the
.B InputClass
directive (refer to
.BR xorg.conf (__filemansuffix__))
instead of manual per-device configuration.
Devices configured in the
.BR xorg.conf (__filemansuffix__)
are not hot-plug capable.
.SH SUPPORTED HARDWARE
In general, any input device that the kernel has a driver for can be accessed
through the
.B evdev
driver.
See the Linux kernel documentation for a complete list.
.SH CONFIGURATION DETAILS
Please refer to
.BR xorg.conf (__filemansuffix__)
for general configuration details and
for options that can be used with all input drivers.
This section only covers configuration details specific to this driver.
.PP
The following driver
.B Options
are supported:
.TP 7
.BI "Option \*qButtonMapping\*q \*q" string \*q
Sets the button mapping for this device.
The mapping is a space-separated list of button mappings
that correspond in order to the physical buttons on the device
(i.e. the first number is the mapping for button 1, etc.).
The default mapping is "1 2 3 ... 32".
A mapping of 0 deactivates the button.
Multiple buttons can have the same mapping.
For example, a left-handed mouse with deactivated scroll-wheel would use a
mapping of "3 2 1 0 0".
Invalid mappings are ignored and the default mapping is used.
Buttons not specified in the user's mapping use the default mapping.
.TP 7
.BI "Option \*qDevice\*q \*q" string \*q
Specifies the device through which the device can be accessed.
This will generally be of the form \*q/dev/input/eventX\*q,
where X is some integer.
The mapping from device node to hardware is system-dependent.
Property: "Device Node" (read-only).
.TP 7
.BI "Option \*qDragLockButtons\*q \*q" "L1 B2 L3 B4" \*q
Sets \*qdrag lock buttons\*q that simulate holding a button down, so
that low dexterity people do not have to hold a button down at the
same time they move a mouse cursor.
Button numbers occur in pairs,
with the lock button number occurring first,
followed by the button number that is the target of the lock button.
Property: "Evdev
Drag Lock Buttons".
.TP 7
.BI "Option \*qDragLockButtons\*q \*q" "M1" \*q
Sets a \*qmaster drag lock button\*q that acts as a \*qMeta Key\*q
indicating that the next button pressed is to be \*qdrag locked\*q.
Property: "Evdev Drag Lock Buttons".
.TP 7
.BI "Option \*qEmulate3Buttons\*q \*q" boolean \*q
Enable/disable the emulation of the third (middle) mouse button for mice
which only have two physical buttons.
The third button is emulated by pressing both buttons simultaneously.
Default: off.
Property: "Evdev Middle Button Emulation".
.TP 7
.BI "Option \*qEmulate3Timeout\*q \*q" integer \*q
Sets the timeout (in milliseconds) that the driver waits before deciding
if two buttons were pressed "simultaneously" when 3 button emulation is enabled.
Default: 50.
Property: "Evdev Middle Button Timeout".
.TP 7
.BI "Option \*qEmulate3Button\*q \*q" integer \*q
Specifies the physical button number to be emitted if middle button emulation
is triggered.
Default: 2.
Property: "Evdev Middle Button Button".
.TP 7
.BI "Option \*qEmulateWheel\*q \*q" boolean \*q
Enable/disable "wheel" emulation.
Wheel emulation means emulating button press/release events
when the mouse is moved while a specific real button is pressed.
Wheel button events (typically buttons 4 and 5) are usually used for scrolling.
Wheel emulation is useful for getting wheel-like behaviour with trackballs.
It can also be useful for mice with 4 or more buttons but no wheel.
See the description of the
.BR EmulateWheelButton ,
.BR EmulateWheelInertia ,
.BR EmulateWheelTimeout ,
.BR XAxisMapping ,
and
.B YAxisMapping
options.
Default: off.
Property: "Evdev Wheel Emulation".
.TP 7
.BI "Option \*qEmulateWheelButton\*q \*q" integer \*q
Specifies which button must be held down to enable wheel emulation mode.
While this button is down, X and/or Y pointer movement will generate button
press/release events as specified for the
.B XAxisMapping
and
.B YAxisMapping
settings.
If the button is 0 and
.B EmulateWheel
is on, any motion of the device is converted into wheel events.
Default: 4.
Property: "Evdev Wheel Emulation Button".
.TP 7
.BI "Option \*qEmulateWheelInertia\*q \*q" integer \*q
Specifies how far (in pixels) the pointer must move to generate button
press/release events in wheel emulation mode.
Default: 10.
Property: "Evdev Wheel Emulation Inertia".
.IP
This value must be set for any device does not resemble a standard mouse.
Specifically, on absolute devices such as tablets the value should be set to
a reasonable fraction of the expected movement to avoid excess scroll events.
.IP
.B WARNING:
the name \*qinertia\*q is a misnomer.
This option defines the distance required to generate one scroll event
similar to the
.B VertScrollDelta
and
.B HorizScrollDelta
options.
It does not enable inertia in the physical sense,
scrolling stops immediately once the movement has stopped.
.TP 7
.BI "Option \*qEmulateWheelTimeout\*q \*q" integer \*q
Specifies the time in milliseconds the
.B EmulateWheelButton
must be pressed before wheel emulation is started.
If the
.B EmulateWheelButton
is released before this timeout,
the original button press/release event is sent.
Default: 200.
Property: "Evdev Wheel Emulation Timeout".
.TP 7
.BI "Option \*qEmulateThirdButton\*q \*q" boolean \*q
Enable third button emulation.
Third button emulation emits a right button event (by default)
by pressing and holding the first button.
The first button must be held down for the configured timeout and
must not move more than the configured threshold for the emulation to activate.
Otherwise, the first button event is posted as normal.
Default: off.
Property: "Evdev Third Button Emulation".
.TP 7
.BI "Option \*qEmulateThirdButtonTimeout\*q \*q" integer \*q
Specifies the timeout in milliseconds between the initial button press and
the generation of the emulated button event.
Default: 1000.
Property: "Evdev Third Button Emulation Timeout".
.TP 7
.BI "Option \*qEmulateThirdButtonButton\*q \*q" integer \*q
Specifies the physical button number to be emitted if third button emulation
is triggered.
Default: 3.
Property: "Evdev Third Button Button".
.TP 7
.BI "Option \*qEmulateThirdButtonMoveThreshold\*q \*q" integer \*q
Specifies the maximum move fuzz in device coordinates for third button
emulation.
If the device moves by more than this threshold before the third
button emulation is triggered, the emulation is cancelled and a first button
event is generated as normal.
Default: 20.
Property: "Evdev Third Button Emulation Threshold".
.TP 7
.BI "Option \*qGrabDevice\*q \*q" boolean \*q
Force a grab on the event device.
Doing so will ensure that no other driver
can initialise the same device and it will also stop the device from sending
events to /dev/kbd or /dev/input/mice.
Events from this device will not be sent to virtual devices
(e.g. rfkill or the Macintosh mouse button emulation).
Default: disabled.
.TP 7
.BI "Option \*qInvertX\*q \*q" Bool \*q
.TP 7
.BI "Option \*qInvertY\*q \*q" Bool \*q
Invert the given axis.
Default: off.
Property: "Evdev Axis Inversion".
.TP 7
.BI "Option \*qIgnoreRelativeAxes\*q \*q" Bool \*q
.TP 7
.BI "Option \*qIgnoreAbsoluteAxes\*q \*q" Bool \*q
Ignore the specified type of axis.
Default: unset.
The X server cannot deal with devices that have both relative and absolute axes.
Evdev tries to guess which axes to ignore given the device type and
disables absolute axes for mice and relative axes for tablets, touchscreens,
and touchpad.
These options allow to forcibly disable an axis type.
Mouse wheel axes are exempt and will work even if relative axes are ignored.
No property, this configuration must be set in the configuration.
.br
If either option is set to False, the driver will not ignore the specified
axes regardless of the presence of other axes.
This may trigger buggy behavior and events from this axis are always forwarded.
Users are discouraged from setting this option.
.TP 7
.BI "Option \*qCalibration\*q \*q" "min-x max-x min-y max-y" \*q
Calibrates the X and Y axes for devices that need to scale to a different
coordinate system than reported to the X server.
This feature is required for devices that need to scale to
a different coordinate system than originally reported by the kernel
(e.g. touchscreens).
The scaling to the custom coordinate system is done in-driver and
the X server is unaware of the transformation.
Property: "Evdev Axis Calibration".
.TP 7
.B Option \*qMode\*q \*qRelative\*q\fP|\fP\*qAbsolute\*q
Sets the mode of the device if device has absolute axes.
The default value for touchpads is relative, for other absolute.
This option has no effect on devices without absolute axes.
.TP 7
.BI "Option \*qSwapAxes\*q \*q" Bool \*q
Swap x/y axes.
Default: off.
Property: "Evdev Axes Swap".
.TP 7
.BI "Option \*qXAxisMapping\*q \*q" "N1 N2" \*q
Specifies which buttons are mapped to motion in the X direction in wheel
emulation mode.
Button number
.I N1
is mapped to the negative X axis motion and button number
.I N2
is mapped to the positive X axis motion.
Default: no mapping.
Property: "Evdev Wheel Emulation Axes".
.TP 7
.BI "Option \*qYAxisMapping\*q \*q" "N1 N2" \*q
Specifies which buttons are mapped to motion in the Y direction in wheel
emulation mode.
Button number
.I N1
is mapped to the negative Y axis motion and button number
.I N2
is mapped to the positive Y axis motion.
Default: "4 5".
Property: "Evdev Wheel Emulation Axes".
.TP 7
.BI "Option \*qTypeName\*q" \*q"type"\*q
Specify the X Input 1.x type (see
.BR XListInputDevices (__libmansuffix__)).
There is rarely a need to use this option, evdev will guess the device type
based on the device's capabilities.
This option is provided for devices that need quirks.
.TP 7
.BI "Option \*qVertScrollDelta\*q \*q" integer \*q
The amount of motion considered one unit of scrolling vertically.
Default: "1".
Property: "Evdev Scrolling Distance".
.TP 7
.BI "Option \*qHorizScrollDelta\*q \*q" integer \*q
The amount of motion considered one unit of scrolling horizontally.
Default: "1".
Property: "Evdev Scrolling Distance".
.TP 7
.BI "Option \*qDialDelta\*q \*q" integer \*q
The amount of motion considered one unit of turning the dial.
Default: "1".
Property: "Evdev Scrolling Distance".
.TP 7
.BI "Option \*qResolution\*q \*q" integer \*q
Sets the resolution of the device in dots per inch.
The resolution is used to scale relative motion events from mouse devices to
1000 DPI resolution.
This can be used to make high resolution mice less sensitive without turning off
acceleration.
If set to 0 no scaling will be performed.
Default: "0".
.SH SUPPORTED PROPERTIES
The following properties are provided by the
.B evdev
driver.
.TP 7
.B "Evdev Axis Calibration"
4 32-bit values, order min-x, max-x, min-y, max-y or 0 values to disable
in-driver axis calibration.
.TP 7
.B "Evdev Axis Inversion"
2 boolean values (8 bit, 0 or 1), order X, Y.
1 inverts the axis.
.TP 7
.B "Evdev Axes Swap"
1 boolean value (8 bit, 0 or 1).
1 swaps x/y axes.
.TP 7
.B "Evdev Drag Lock Buttons"
8-bit. Either 1 value or pairs of values.
Value range 0-32, 0 disables a value.
.TP 7
.B "Evdev Middle Button Emulation"
1 boolean value (8 bit, 0 or 1).
.TP 7
.B "Evdev Middle Button Timeout"
1 16-bit positive value.
.TP 7
.B "Evdev Middle Button Button"
1 8-bit value, allowed range 0-32, 0 disables the button.
.TP 7
.B "Evdev Wheel Emulation"
1 boolean value (8 bit, 0 or 1).
.TP 7
.B "Evdev Wheel Emulation Axes"
4 8-bit values, order X up, X down, Y up, Y down.
0 disables a value.
.TP 7
.B "Evdev Wheel Emulation Button"
1 8-bit value, allowed range 0-32, 0 disables the button.
.TP 7
.B "Evdev Wheel Emulation Inertia"
1 16-bit positive value.
.TP 7
.B "Evdev Wheel Emulation Timeout"
1 16-bit positive value.
.TP 7
.B "Evdev Scrolling Distance"
3 32-bit values: vertical, horizontal and dial.
.SH AUTHORS
Kristian Høgsberg, Peter Hutterer
.SH "SEE ALSO"
.BR XLibre (@APP_MAN_SUFFIX@),
.BR xorg.conf (@FILE_MAN_SUFFIX@),
.BR Xserver (@APP_MAN_SUFFIX@),
.BR X (@MISC_MAN_SUFFIX@)

View File

@@ -28,17 +28,16 @@
AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
AM_CPPFLAGS =-I$(top_srcdir)/include $(LIBEVDEV_CFLAGS) AM_CPPFLAGS =-I$(top_srcdir)/include $(LIBEVDEV_CFLAGS)
@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la evdev_drv_la_LTLIBRARIES = evdev_drv.la
@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version evdev_drv_la_LDFLAGS = -module -avoid-version
@DRIVER_NAME@_drv_la_LIBADD = $(MTDEV_LIBS) $(UDEV_LIBS) $(LIBEVDEV_LIBS) evdev_drv_la_LIBADD = $(MTDEV_LIBS) $(UDEV_LIBS) $(LIBEVDEV_LIBS)
@DRIVER_NAME@_drv_ladir = @inputdir@ evdev_drv_ladir = @xlibre_input_drivers_dir@
@DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c \ evdev_drv_la_SOURCES = evdev.c \
@DRIVER_NAME@.h \ evdev.h \
emuMB.c \ emuMB.c \
emuThird.c \ emuThird.c \
emuWheel.c \ emuWheel.c \
draglock.c \ draglock.c \
apple.c \ apple.c \
axis_labels.h axis_labels.h

View File

@@ -24,9 +24,7 @@
* Peter Hutterer (peter.hutterer@redhat.com) * Peter Hutterer (peter.hutterer@redhat.com)
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <evdev.h> #include <evdev.h>
#include <evdev-properties.h> #include <evdev-properties.h>

View File

@@ -21,9 +21,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include <xserver-properties.h> #include <xserver-properties.h>

View File

@@ -5,7 +5,7 @@
* Copyright 1994-2002 by The XFree86 Project, Inc. * Copyright 1994-2002 by The XFree86 Project, Inc.
* Copyright 2002 by Paul Elliott * Copyright 2002 by Paul Elliott
* (Ported from xf86-input-mouse, above copyrights taken from there) * (Ported from xf86-input-mouse, above copyrights taken from there)
* Copyright © 2008 University of South Australia * Copyright © 2008 University of South Australia
* Copyright 2008 by Chris Salch * Copyright 2008 by Chris Salch
* Copyright 2008 Red Hat, Inc. * Copyright 2008 Red Hat, Inc.
* *
@@ -32,9 +32,7 @@
/* Draglock code */ /* Draglock code */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include "evdev.h" #include "evdev.h"
#include <xf86.h> #include <xf86.h>

View File

@@ -30,10 +30,7 @@
/* Middle mouse button emulation code. */ /* Middle mouse button emulation code. */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include "evdev.h" #include "evdev.h"
#include <X11/Xatom.h> #include <X11/Xatom.h>
@@ -45,6 +42,7 @@
static Atom prop_mbemu = 0; /* Middle button emulation on/off property */ static Atom prop_mbemu = 0; /* Middle button emulation on/off property */
static Atom prop_mbtimeout = 0; /* Middle button timeout property */ static Atom prop_mbtimeout = 0; /* Middle button timeout property */
static Atom prop_mbbuton = 0; /* Middle button target button property */
/* /*
* Lets create a simple finite-state machine for 3 button emulation: * Lets create a simple finite-state machine for 3 button emulation:
* *
@@ -184,14 +182,17 @@ int
EvdevMBEmuTimer(InputInfoPtr pInfo) EvdevMBEmuTimer(InputInfoPtr pInfo)
{ {
EvdevPtr pEvdev = pInfo->private; EvdevPtr pEvdev = pInfo->private;
int sigstate;
int id; int id;
int mapped_id;
sigstate = xf86BlockSIGIO (); input_lock();
pEvdev->emulateMB.pending = FALSE; pEvdev->emulateMB.pending = FALSE;
if ((id = stateTab[pEvdev->emulateMB.state][4][0]) != 0) { if ((id = stateTab[pEvdev->emulateMB.state][4][0]) != 0) {
EvdevPostButtonEvent(pInfo, abs(id), mapped_id = abs(id);
if (mapped_id == 2)
mapped_id = pEvdev->emulateMB.button;
EvdevPostButtonEvent(pInfo, mapped_id,
(id >= 0) ? BUTTON_PRESS : BUTTON_RELEASE); (id >= 0) ? BUTTON_PRESS : BUTTON_RELEASE);
pEvdev->emulateMB.state = pEvdev->emulateMB.state =
stateTab[pEvdev->emulateMB.state][4][2]; stateTab[pEvdev->emulateMB.state][4][2];
@@ -200,7 +201,7 @@ EvdevMBEmuTimer(InputInfoPtr pInfo)
pEvdev->emulateMB.state); pEvdev->emulateMB.state);
} }
xf86UnblockSIGIO (sigstate); input_unlock();
return 0; return 0;
} }
@@ -219,6 +220,7 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
{ {
EvdevPtr pEvdev = pInfo->private; EvdevPtr pEvdev = pInfo->private;
int id; int id;
int mapped_id;
int *btstate; int *btstate;
int ret = FALSE; int ret = FALSE;
@@ -237,7 +239,10 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
if ((id = stateTab[pEvdev->emulateMB.state][*btstate][0]) != 0) if ((id = stateTab[pEvdev->emulateMB.state][*btstate][0]) != 0)
{ {
EvdevQueueButtonEvent(pInfo, abs(id), (id >= 0)); mapped_id = abs(id);
if (mapped_id == 2)
mapped_id = pEvdev->emulateMB.button;
EvdevQueueButtonEvent(pInfo, mapped_id, (id >= 0));
ret = TRUE; ret = TRUE;
} }
if ((id = stateTab[pEvdev->emulateMB.state][*btstate][1]) != 0) if ((id = stateTab[pEvdev->emulateMB.state][*btstate][1]) != 0)
@@ -261,9 +266,7 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
} }
void EvdevMBEmuWakeupHandler(pointer data, void EvdevMBEmuWakeupHandler(void *data, int i)
int i,
pointer LastSelectMask)
{ {
InputInfoPtr pInfo = (InputInfoPtr)data; InputInfoPtr pInfo = (InputInfoPtr)data;
EvdevPtr pEvdev = (EvdevPtr)pInfo->private; EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
@@ -277,9 +280,7 @@ void EvdevMBEmuWakeupHandler(pointer data,
} }
} }
void EvdevMBEmuBlockHandler(pointer data, void EvdevMBEmuBlockHandler(void *data, void *waitTime)
struct timeval **waitTime,
pointer LastSelectMask)
{ {
InputInfoPtr pInfo = (InputInfoPtr) data; InputInfoPtr pInfo = (InputInfoPtr) data;
EvdevPtr pEvdev= (EvdevPtr) pInfo->private; EvdevPtr pEvdev= (EvdevPtr) pInfo->private;
@@ -298,12 +299,23 @@ void
EvdevMBEmuPreInit(InputInfoPtr pInfo) EvdevMBEmuPreInit(InputInfoPtr pInfo)
{ {
EvdevPtr pEvdev = (EvdevPtr)pInfo->private; EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
int bt;
pEvdev->emulateMB.enabled = xf86SetBoolOption(pInfo->options, pEvdev->emulateMB.enabled = xf86SetBoolOption(pInfo->options,
"Emulate3Buttons", "Emulate3Buttons",
FALSE); FALSE);
pEvdev->emulateMB.timeout = xf86SetIntOption(pInfo->options, pEvdev->emulateMB.timeout = xf86SetIntOption(pInfo->options,
"Emulate3Timeout", 50); "Emulate3Timeout", 50);
bt = xf86SetIntOption(pInfo->options, "Emulate3Button", 2);
if (bt < 0 || bt > EVDEV_MAXBUTTONS) {
xf86IDrvMsg(pInfo, X_WARNING, "Invalid Emulate3Button value: %d\n",
bt);
xf86IDrvMsg(pInfo, X_WARNING, "Middle button emulation disabled.\n");
pEvdev->emulateMB.enabled = FALSE;
}
pEvdev->emulateMB.button = bt;
} }
void void
@@ -314,7 +326,7 @@ EvdevMBEmuOn(InputInfoPtr pInfo)
RegisterBlockAndWakeupHandlers (EvdevMBEmuBlockHandler, RegisterBlockAndWakeupHandlers (EvdevMBEmuBlockHandler,
EvdevMBEmuWakeupHandler, EvdevMBEmuWakeupHandler,
(pointer)pInfo); (void*)pInfo);
} }
void void
@@ -325,7 +337,7 @@ EvdevMBEmuFinalize(InputInfoPtr pInfo)
RemoveBlockAndWakeupHandlers (EvdevMBEmuBlockHandler, RemoveBlockAndWakeupHandlers (EvdevMBEmuBlockHandler,
EvdevMBEmuWakeupHandler, EvdevMBEmuWakeupHandler,
(pointer)pInfo); (void*)pInfo);
} }
@@ -335,6 +347,7 @@ EvdevMBEmuSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
{ {
InputInfoPtr pInfo = dev->public.devicePrivate; InputInfoPtr pInfo = dev->public.devicePrivate;
EvdevPtr pEvdev = pInfo->private; EvdevPtr pEvdev = pInfo->private;
int bt;
if (atom == prop_mbemu) if (atom == prop_mbemu)
{ {
@@ -350,6 +363,18 @@ EvdevMBEmuSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
if (!checkonly) if (!checkonly)
pEvdev->emulateMB.timeout = *((CARD32*)val->data); pEvdev->emulateMB.timeout = *((CARD32*)val->data);
} else if (atom == prop_mbbuton)
{
if (val->format != 8 || val->size != 1 || val->type != XA_INTEGER)
return BadMatch;
bt = *((CARD8*)val->data);
if (bt < 0 || bt > EVDEV_MAXBUTTONS)
return BadValue;
if (!checkonly)
pEvdev->emulateMB.button = bt;
} }
return Success; return Success;
@@ -387,5 +412,15 @@ EvdevMBEmuInitProperty(DeviceIntPtr dev)
return; return;
XISetDevicePropertyDeletable(dev, prop_mbtimeout, FALSE); XISetDevicePropertyDeletable(dev, prop_mbtimeout, FALSE);
prop_mbbuton = MakeAtom(EVDEV_PROP_MIDBUTTON_BUTTON,
strlen(EVDEV_PROP_MIDBUTTON_BUTTON),
TRUE);
rc = XIChangeDeviceProperty(dev, prop_mbbuton, XA_INTEGER, 8, PropModeReplace, 1,
&pEvdev->emulateMB.button, FALSE);
if (rc != Success)
return;
XISetDevicePropertyDeletable(dev, prop_mbbuton, FALSE);
XIRegisterPropertyHandler(dev, EvdevMBEmuSetProperty, NULL, NULL); XIRegisterPropertyHandler(dev, EvdevMBEmuSetProperty, NULL, NULL);
} }

View File

@@ -29,10 +29,7 @@
* generated. * generated.
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include "evdev.h" #include "evdev.h"
#include <X11/Xatom.h> #include <X11/Xatom.h>
@@ -84,17 +81,16 @@ Evdev3BEmuPostButtonEvent(InputInfoPtr pInfo, int button, enum ButtonAction act)
* @param arg The InputInfoPtr for this device. * @param arg The InputInfoPtr for this device.
*/ */
CARD32 CARD32
Evdev3BEmuTimer(OsTimerPtr timer, CARD32 time, pointer arg) Evdev3BEmuTimer(OsTimerPtr timer, CARD32 time, void *arg)
{ {
InputInfoPtr pInfo = (InputInfoPtr)arg; InputInfoPtr pInfo = (InputInfoPtr)arg;
EvdevPtr pEvdev = pInfo->private; EvdevPtr pEvdev = pInfo->private;
struct emulate3B *emu3B = &pEvdev->emulate3B; struct emulate3B *emu3B = &pEvdev->emulate3B;
int sigstate = 0;
sigstate = xf86BlockSIGIO (); input_lock();
emu3B->state = EM3B_EMULATING; emu3B->state = EM3B_EMULATING;
Evdev3BEmuPostButtonEvent(pInfo, emu3B->button, BUTTON_PRESS); Evdev3BEmuPostButtonEvent(pInfo, emu3B->button, BUTTON_PRESS);
xf86UnblockSIGIO (sigstate); input_unlock();
return 0; return 0;
} }

View File

@@ -30,9 +30,7 @@
*/ */
/* Mouse wheel emulation code. */ /* Mouse wheel emulation code. */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include "evdev.h" #include "evdev.h"
#include <X11/Xatom.h> #include <X11/Xatom.h>
@@ -50,7 +48,7 @@ static Atom prop_wheel_inertia = 0;
static Atom prop_wheel_timeout = 0; static Atom prop_wheel_timeout = 0;
static Atom prop_wheel_button = 0; static Atom prop_wheel_button = 0;
/* Local Funciton Prototypes */ /* Local Function Prototypes */
static int EvdevWheelEmuInertia(InputInfoPtr pInfo, WheelAxisPtr axis, int value); static int EvdevWheelEmuInertia(InputInfoPtr pInfo, WheelAxisPtr axis, int value);
/* Filter mouse button events */ /* Filter mouse button events */
@@ -210,9 +208,7 @@ EvdevWheelEmuHandleButtonMap(InputInfoPtr pInfo, WheelAxisPtr pAxis,
((up_button > 0) && (up_button <= EVDEV_MAXBUTTONS)) && ((up_button > 0) && (up_button <= EVDEV_MAXBUTTONS)) &&
((down_button > 0) && (down_button <= EVDEV_MAXBUTTONS))) { ((down_button > 0) && (down_button <= EVDEV_MAXBUTTONS))) {
/* Use xstrdup to allocate a string for us */ msg = strdup("buttons XX and YY");
msg = xstrdup("buttons XX and YY");
if (msg) if (msg)
sprintf(msg, "buttons %d and %d", up_button, down_button); sprintf(msg, "buttons %d and %d", up_button, down_button);

View File

@@ -28,19 +28,17 @@
* Thomas H.P. Andersen (phomes@gmail.com) * Thomas H.P. Andersen (phomes@gmail.com)
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#include "evdev.h" #include "evdev.h"
#include "axis_labels.h" #include "axis_labels.h"
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/extensions/XI.h> #include <X11/extensions/XI.h>
#include <linux/version.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef HAVE_LIBUDEV
#include <libudev.h> #include <libudev.h>
#endif
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
@@ -74,8 +72,8 @@
#define CAPSFLAG 1 #define CAPSFLAG 1
#define NUMFLAG 2 #define NUMFLAG 2
#define SCROLLFLAG 4 #define SCROLLFLAG 4
#define MODEFLAG 8 #define COMPOSEFLAG 8
#define COMPOSEFLAG 16 #define MODEFLAG 16
#ifndef ABS_MT_SLOT #ifndef ABS_MT_SLOT
#define ABS_MT_SLOT 0x2f #define ABS_MT_SLOT 0x2f
@@ -226,6 +224,7 @@ EvdevIsDuplicate(InputInfoPtr pInfo)
static BOOL static BOOL
EvdevDeviceIsVirtual(const char* devicenode) EvdevDeviceIsVirtual(const char* devicenode)
{ {
#ifdef HAVE_LIBUDEV
struct udev *udev = NULL; struct udev *udev = NULL;
struct udev_device *device = NULL; struct udev_device *device = NULL;
struct stat st; struct stat st;
@@ -256,6 +255,9 @@ out:
udev_device_unref(device); udev_device_unref(device);
udev_unref(udev); udev_unref(udev);
return rc; return rc;
#else
return FALSE;
#endif
} }
@@ -277,7 +279,7 @@ EvdevNextInQueue(InputInfoPtr pInfo)
void void
EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value) EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
{ {
int code = ev->code + MIN_KEYCODE; int code = ev->code;
EventQueuePtr pQueue; EventQueuePtr pQueue;
/* Filter all repeated events from device. /* Filter all repeated events from device.
@@ -285,10 +287,18 @@ EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
if (value == 2) if (value == 2)
return; return;
/* keycodes > 256 that have a historical mapping in xkeyboard-config */
switch (code) {
case KEY_TOUCHPAD_TOGGLE: code = KEY_F21; break;
case KEY_TOUCHPAD_ON: code = KEY_F22; break;
case KEY_TOUCHPAD_OFF: code = KEY_F23; break;
case KEY_MICMUTE: code = KEY_F20; break;
}
if ((pQueue = EvdevNextInQueue(pInfo))) if ((pQueue = EvdevNextInQueue(pInfo)))
{ {
pQueue->type = EV_QUEUE_KEY; pQueue->type = EV_QUEUE_KEY;
pQueue->detail.key = code; pQueue->detail.key = code + MIN_KEYCODE;
pQueue->val = value; pQueue->val = value;
} }
} }
@@ -551,6 +561,16 @@ EvdevProcessProximityState(InputInfoPtr pInfo)
} }
} }
/* Wacom's last frame resets all values to 0, including x/y.
Skip over this. */
if (prox_state == 0) {
int v;
if (valuator_mask_fetch(pEvdev->abs_vals, 0, &v) && v == 0)
valuator_mask_unset(pEvdev->abs_vals, 0);
if (valuator_mask_fetch(pEvdev->abs_vals, 1, &v) && v == 0)
valuator_mask_unset(pEvdev->abs_vals, 1);
}
if ((prox_state && !pEvdev->in_proximity) || if ((prox_state && !pEvdev->in_proximity) ||
(!prox_state && pEvdev->in_proximity)) (!prox_state && pEvdev->in_proximity))
{ {
@@ -681,12 +701,7 @@ EvdevProcessTouch(InputInfoPtr pInfo)
static int static int
num_slots(EvdevPtr pEvdev) num_slots(EvdevPtr pEvdev)
{ {
int value; int value = pEvdev->mtdev ? pEvdev->mtdev->caps.slot.maximum + 1 : libevdev_get_num_slots(pEvdev->dev);
if (pEvdev->mtdev)
value = pEvdev->mtdev->caps.slot.maximum + 1;
else
value = libevdev_get_num_slots(pEvdev->dev);
/* If we don't know how many slots there are, assume at least 10 */ /* If we don't know how many slots there are, assume at least 10 */
return value > 1 ? value : 10; return value > 1 ? value : 10;
@@ -784,7 +799,6 @@ EvdevProcessAbsoluteMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
if (ev->code >= ABS_MT_SLOT) { if (ev->code >= ABS_MT_SLOT) {
EvdevProcessTouchEvent(pInfo, ev); EvdevProcessTouchEvent(pInfo, ev);
pEvdev->abs_queued = 1;
} else if (!pEvdev->mt_mask) { } else if (!pEvdev->mt_mask) {
map = pEvdev->abs_axis_map[ev->code]; map = pEvdev->abs_axis_map[ev->code];
@@ -906,7 +920,7 @@ EvdevPostProximityEvents(InputInfoPtr pInfo, int which)
break; break;
case EV_QUEUE_PROXIMITY: case EV_QUEUE_PROXIMITY:
if (pEvdev->queue[i].val == which) if (pEvdev->queue[i].val == which)
xf86PostProximityEvent(pInfo->dev, which, 0, 0); xf86PostProximityEventM(pInfo->dev, which, pEvdev->old_vals);
break; break;
} }
} }
@@ -1063,11 +1077,13 @@ EvdevReadInput(InputInfoPtr pInfo)
do { do {
rc = libevdev_next_event(pEvdev->dev, LIBEVDEV_READ_FLAG_NORMAL, &ev); rc = libevdev_next_event(pEvdev->dev, LIBEVDEV_READ_FLAG_NORMAL, &ev);
if (rc < 0) { if (rc < 0) {
if (rc == -ENODEV) /* May happen after resume */ if (rc != -EAGAIN && rc != -EINTR && rc != -EWOULDBLOCK) {
/* May happen after resume or at device detach */
xf86RemoveEnabledDevice(pInfo); xf86RemoveEnabledDevice(pInfo);
else if (rc != -EAGAIN) EvdevCloseDevice(pInfo);
LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error: %s\n", pInfo->name, LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error: %s\n", pInfo->name,
strerror(-rc)); strerror(-rc));
}
break; break;
} else if (rc == LIBEVDEV_READ_STATUS_SUCCESS) { } else if (rc == LIBEVDEV_READ_STATUS_SUCCESS) {
if (pEvdev->mtdev) if (pEvdev->mtdev)
@@ -1101,13 +1117,14 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl)
{ CAPSFLAG, LED_CAPSL }, { CAPSFLAG, LED_CAPSL },
{ NUMFLAG, LED_NUML }, { NUMFLAG, LED_NUML },
{ SCROLLFLAG, LED_SCROLLL }, { SCROLLFLAG, LED_SCROLLL },
{ MODEFLAG, LED_KANA }, { COMPOSEFLAG, LED_COMPOSE },
{ COMPOSEFLAG, LED_COMPOSE } { MODEFLAG, LED_KANA }
}; };
InputInfoPtr pInfo; InputInfoPtr pInfo;
struct input_event ev[ArrayLength(bits) + 1]; struct input_event ev[ArrayLength(bits) + 1];
int i; int i;
int rc;
memset(ev, 0, sizeof(ev)); memset(ev, 0, sizeof(ev));
@@ -1122,7 +1139,9 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl)
ev[i].code = SYN_REPORT; ev[i].code = SYN_REPORT;
ev[i].value = 0; ev[i].value = 0;
write(pInfo->fd, ev, sizeof ev); rc = write(pInfo->fd, ev, sizeof ev);
if (rc != sizeof ev)
xf86IDrvMsg(pInfo, X_ERROR, "Failed to set keyboard controls: %s\n", strerror(errno));
} }
static int static int
@@ -1235,7 +1254,7 @@ EvdevCountMTAxes(EvdevPtr pEvdev, int *num_mt_axes_total,
return; return;
/* Absolute multitouch axes: adjust mapping and axes counts. */ /* Absolute multitouch axes: adjust mapping and axes counts. */
for (axis = ABS_MT_SLOT; axis < ABS_MAX; axis++) for (axis = ABS_MT_SLOT; axis <= ABS_MAX; axis++)
{ {
int j; int j;
Bool skip = FALSE; Bool skip = FALSE;
@@ -1285,7 +1304,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int num_scroll_axes)
goto out; goto out;
/* Find number of absolute axis, including MT ones, will decrease later. */ /* Find number of absolute axis, including MT ones, will decrease later. */
for (i = 0; i < ABS_MAX; i++) for (i = 0; i <= ABS_MAX; i++)
if (libevdev_has_event_code(pEvdev->dev, EV_ABS, i)) if (libevdev_has_event_code(pEvdev->dev, EV_ABS, i))
num_axes++; num_axes++;
@@ -1453,7 +1472,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int num_scroll_axes)
} }
for (i = 0; i < num_touches; i++) { for (i = 0; i < num_touches; i++) {
for (axis = ABS_MT_TOUCH_MAJOR; axis < ABS_MAX; axis++) { for (axis = ABS_MT_TOUCH_MAJOR; axis <= ABS_MAX; axis++) {
if (pEvdev->abs_axis_map[axis] >= 0) { if (pEvdev->abs_axis_map[axis] >= 0) {
int val = pEvdev->mtdev ? 0 : libevdev_get_current_slot(pEvdev->dev); int val = pEvdev->mtdev ? 0 : libevdev_get_current_slot(pEvdev->dev);
/* XXX: read initial values from mtdev when it adds support /* XXX: read initial values from mtdev when it adds support
@@ -1474,10 +1493,8 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int num_scroll_axes)
continue; continue;
abs = libevdev_get_abs_info(pEvdev->dev, axis); abs = libevdev_get_abs_info(pEvdev->dev, axis);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 30)
/* Kernel provides units/mm, X wants units/m */ /* Kernel provides units/mm, X wants units/m */
resolution = abs->resolution * 1000; resolution = abs->resolution * 1000;
#endif
xf86InitValuatorAxisStruct(device, axnum, xf86InitValuatorAxisStruct(device, axnum,
atoms[axnum], atoms[axnum],
@@ -1666,7 +1683,7 @@ EvdevAddRelValuatorClass(DeviceIntPtr device, int num_scroll_axes)
if (!libevdev_has_event_type(pEvdev->dev, EV_REL)) if (!libevdev_has_event_type(pEvdev->dev, EV_REL))
goto out; goto out;
for (i = 0; i < REL_MAX; i++) { for (i = 0; i <= REL_MAX; i++) {
if (i == REL_WHEEL || i == REL_HWHEEL || i == REL_DIAL) if (i == REL_WHEEL || i == REL_HWHEEL || i == REL_DIAL)
continue; continue;
@@ -1921,7 +1938,7 @@ EvdevInit(DeviceIntPtr device)
* So, unless you have a small screen, you won't be enjoying it much; * So, unless you have a small screen, you won't be enjoying it much;
* consequently, absolute axes are generally ignored. * consequently, absolute axes are generally ignored.
* *
* However, currenly only a device with absolute axes can be registered * However, currently only a device with absolute axes can be registered
* as a touch{pad,screen}. Thus, given such a device, absolute axes are * as a touch{pad,screen}. Thus, given such a device, absolute axes are
* used and relative axes are ignored. * used and relative axes are ignored.
*/ */
@@ -2351,8 +2368,10 @@ EvdevProbe(InputInfoPtr pInfo)
pInfo->type_name = XI_TOUCHSCREEN; pInfo->type_name = XI_TOUCHSCREEN;
} else { } else {
if (!libevdev_has_event_code(pEvdev->dev, EV_REL, REL_X) || if (!libevdev_has_event_code(pEvdev->dev, EV_REL, REL_X) ||
!libevdev_has_event_code(pEvdev->dev, EV_REL, REL_Y)) !libevdev_has_event_code(pEvdev->dev, EV_REL, REL_Y)) {
pEvdev->flags |= EVDEV_RELATIVE_EVENTS;
EvdevForceXY(pInfo, Relative); EvdevForceXY(pInfo, Relative);
}
xf86IDrvMsg(pInfo, X_INFO, "Configuring as mouse\n"); xf86IDrvMsg(pInfo, X_INFO, "Configuring as mouse\n");
pInfo->type_name = XI_MOUSE; pInfo->type_name = XI_MOUSE;
} }
@@ -2483,7 +2502,7 @@ EvdevOpenDevice(InputInfoPtr pInfo)
} }
if (pInfo->fd < 0) { if (pInfo->fd < 0) {
xf86IDrvMsg(pInfo, X_ERROR, "Unable to open evdev device \"%s\".\n", device); xf86IDrvMsg(pInfo, X_ERROR, "Unable to open evdev device \"%s\" (%s).\n", device, strerror(errno));
return BadValue; return BadValue;
} }
@@ -2674,16 +2693,9 @@ _X_EXPORT InputDriverRec EVDEV = {
#endif #endif
}; };
static void static void EvdevUnplug(void *p) { }
EvdevUnplug(pointer p)
{
}
static pointer static void *EvdevPlug(void *module, void *options, int *errmaj, int *errmin)
EvdevPlug(pointer module,
pointer options,
int *errmaj,
int *errmin)
{ {
xf86AddInputDriver(&EVDEV, module, 0); xf86AddInputDriver(&EVDEV, module, 0);
return module; return module;

View File

@@ -28,15 +28,20 @@
* Oliver McFadden (oliver.mcfadden@nokia.com) * Oliver McFadden (oliver.mcfadden@nokia.com)
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif
#ifndef EVDEV_H #ifndef EVDEV_H
#define EVDEV_H #define EVDEV_H
#include <linux/input.h> #include <linux/input.h>
#include <linux/types.h> #include <sys/types.h>
/* Tolerate prior #include <linux/input.h> */
#undef BUS_NONE
#undef BUS_PCI
#undef BUS_SBUS
#undef BUS_PLATFORM
#undef BUS_USB
#include <xorg-server.h> #include <xorg-server.h>
#include <xf86Xinput.h> #include <xf86Xinput.h>
@@ -63,10 +68,6 @@
#define LED_CNT (LED_MAX+1) #define LED_CNT (LED_MAX+1)
#endif #endif
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18
#define LogMessageVerbSigSafe xf86MsgVerb
#endif
#define EVDEV_MAXBUTTONS 32 #define EVDEV_MAXBUTTONS 32
#define EVDEV_MAXQUEUE 32 #define EVDEV_MAXQUEUE 32
@@ -184,6 +185,7 @@ typedef struct {
int state; /* state machine (see bt3emu.c) */ int state; /* state machine (see bt3emu.c) */
Time expires; /* time of expiry */ Time expires; /* time of expiry */
Time timeout; Time timeout;
uint8_t button; /* phys button to emit */
} emulateMB; } emulateMB;
/* Third mouse button emulation */ /* Third mouse button emulation */
struct emulate3B { struct emulate3B {
@@ -260,14 +262,14 @@ unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code);
/* Middle Button emulation */ /* Middle Button emulation */
int EvdevMBEmuTimer(InputInfoPtr); int EvdevMBEmuTimer(InputInfoPtr);
BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL); BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL);
void EvdevMBEmuWakeupHandler(pointer, int, pointer); void EvdevMBEmuWakeupHandler(void *data, int i);
void EvdevMBEmuBlockHandler(pointer, struct timeval**, pointer); void EvdevMBEmuBlockHandler(void *data, void *waitTime);
void EvdevMBEmuPreInit(InputInfoPtr); void EvdevMBEmuPreInit(InputInfoPtr);
void EvdevMBEmuOn(InputInfoPtr); void EvdevMBEmuOn(InputInfoPtr);
void EvdevMBEmuFinalize(InputInfoPtr); void EvdevMBEmuFinalize(InputInfoPtr);
/* Third button emulation */ /* Third button emulation */
CARD32 Evdev3BEmuTimer(OsTimerPtr timer, CARD32 time, pointer arg); CARD32 Evdev3BEmuTimer(OsTimerPtr timer, CARD32 time, void *arg);
BOOL Evdev3BEmuFilterEvent(InputInfoPtr, int, BOOL); BOOL Evdev3BEmuFilterEvent(InputInfoPtr, int, BOOL);
void Evdev3BEmuPreInit(InputInfoPtr pInfo); void Evdev3BEmuPreInit(InputInfoPtr pInfo);
void Evdev3BEmuOn(InputInfoPtr); void Evdev3BEmuOn(InputInfoPtr);

View File

@@ -1,6 +0,0 @@
sdkdir=@sdkdir@
Name: xorg-evdev
Description: X.Org evdev input driver.
Version: @PACKAGE_VERSION@
Cflags: -I${sdkdir}