Commit Graph

276 Commits

Author SHA1 Message Date
nia
28ae8e7354 bsd_kbd: Sync with ws keyboard types in NetBSD's fork.
Naturally, since all modern ws keyboard types are either USB
or pretend to be USB, this is just for legacy devices.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
Signed-off-by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/21>
2025-10-24 13:57:07 +02:00
Alan Coopersmith
0acd0a9298 Strip trailing whitespace from source files
Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`

`git diff -w` & `git diff -b` show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/20>
2025-08-12 16:14:02 -07:00
Alan Coopersmith
08eb4fdbeb 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-keyboard/-/merge_requests/19>
xlibre-xf86-input-keyboard-2.1.0.1
2025-06-01 15:48:13 -07:00
Hans Rosenfeld
d65e33572b bsd: Fix DEC LK201 keyboard map.
On the LK201, the F11 serves as Escape by default. The key that's
currently defined as Escape is actually grave/tilde. Also, the Delete
key above Enter is actually a Backspace.

Signed-off-by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/16>
2025-04-13 16:06:01 +00:00
Alan Coopersmith
cb39d1e855 CI: fix missing runner tag on FreeBSD jobs after gitlab migration
All jobs utilizing kvm (eg. FreeBSD) need the "kvm" runner tag set.
It used to work w/o it, since all runners did have kvm, but in the
new CI there are non-kvm runners, so we really need to set the tag.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/18>
2025-04-01 16:44:05 -07:00
Alan Coopersmith
15cbd2daff xf86-input-keyboard 2.1.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xf86-input-keyboard-2.1.0
2024-11-13 16:36:11 -08:00
Alan Coopersmith
6c2a8e59f0 Move sizeof to second argument in calloc calls
Clears -Wcalloc-transposed-args warnings from gcc 14.1, such as:

kbd.c: In function ‘KbdPreInit’:
kbd.c:160:32: warning: ‘calloc’ sizes specified with ‘sizeof’ in the
 earlier argument and not in the later argument [-Wcalloc-transposed-args]
  160 |     if (!(pKbd = calloc(sizeof(KbdDevRec), 1))) {
      |                                ^~~~~~~~~
kbd.c:160:32: note: earlier argument should specify number of elements,
 later size of each element

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/14>
2024-07-14 11:33:37 -07:00
Enrico Weigelt, metux IT consult
8f6fd12607 drop compat for XINPUT < 18
Relying on xserver >= 1.18, which has XINPUT 22.1.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/11>
2024-05-24 14:10:02 +02:00
Enrico Weigelt, metux IT consult
3507c28114 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-keyboard/-/merge_requests/11>
2024-05-24 14:10:02 +02:00
Enrico Weigelt, metux IT consult
5f76f920d5 gitlab CI: fix FreeBSD build
On FreeBSD need to make sure, all pkg-config pathes are searched in the
correct order.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/11>
2024-05-24 14:10:00 +02:00
Enrico Weigelt, metux IT consult
d6d6a3c8b1 gitlab CI: install libepoll-shim
Since MR #1559, the Xserver needs libepoll-shim on FreeBSD.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/11>
2024-05-24 14:09:53 +02:00
nia
e93624c281 bsd: Add some missing special keys from Japanese keyboards
From Yasushi Oshima.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/9>
2024-05-03 19:30:06 +00:00
Alan Coopersmith
f92191b936 gitlab CI: install xorgproto from git before building the Xserver
Xserver git is now failing to build due to:
Dependency presentproto found: NO found 1.3 but need: '>= 1.4'

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/10>
2024-05-03 12:19:09 -07:00
Alan Coopersmith
40ef7d9e24 sun_kbd.c: #include <sys/kbio.h> directly
It's needed for the definitions of the KIO* ioctls used in this file,
but is currently being indirectly included via xf86_OSlib.h.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-03-18 17:45:30 -07:00
Alan Coopersmith
f3510885b2 configure.ac: updates to quiet obsolete macro warnings
Clears autoconf warnings:
configure.ac:38: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
configure.ac:38: You should run autoupdate.
aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from...
configure.ac:38: the top level
configure.ac:51: warning: The macro 'AC_HELP_STRING' is obsolete.
configure.ac:51: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:51: the top level

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-12-02 20:12:38 +00:00
Alan Coopersmith
ced0087506 gitlab CI: update to latest ci-templates & FreeBSD 14.0
Needed to avoid "Failed to unpack image" errors in the container-prep
job since FreeBSD 13.0 images are no longer available for download

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-12-02 12:03:32 -08:00
Alan Coopersmith
7812c11c90 Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-25 09:06:53 -08:00
Alan Coopersmith
fd25755604 gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09 12:06:54 -08:00
Alan Coopersmith
c0c98ec207 xf86-input-keyboard 2.0.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xf86-input-keyboard-2.0.0
2022-07-10 16:19:50 -07:00
Alan Coopersmith
baef4f0057 gitlab CI: add a basic build test
Uses FreeBSD 13.0 for build environment

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-17 15:49:24 -08:00
Alan Coopersmith
8104e36c61 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 11:28:20 -08:00
Alan Coopersmith
61c24f5394 Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-16 11:25:48 -08:00
Peter Hutterer
7b0803b608 Remove two more linux mentions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-30 14:25:34 +10:00
Adam Jackson
7e366936d7 linux: Remove
You almost certainly want to be using libinput or evdev on Linux
systems, and the Linux code is arguably under the GPL, which is a fine
license in general but not for X.org. Delete the Linux support so people
stop using it.
2019-10-29 16:17:27 -04:00
Alan Coopersmith
44fc9bb658 Update configure.ac bug URL for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-25 12:46:53 -08:00
Alan Coopersmith
d2c19a8b12 Update README for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-18 11:38:18 -08:00
Mihail Konev
940f44149d autogen: add default patch prefix
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26 14:00:21 +10:00
Emil Velikov
ac04d59b37 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
6c80cbbd1d 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
0c7f51291f keyboard 1.9.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-keyboard-1.9.0
2016-11-17 14:21:48 +10:00
Keith Packard
157e0631b1 Use xf86AddEnabledDevice with threaded input
We didn't use SIGIO input for keyboard processing, but we can use
threaded input.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-31 07:35:44 +10:00
Alexandr Shadchin
9ab899863a Remove support for X input ABI < 12
Signed-off-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-30 07:03:40 +10:00
Alexandr Shadchin
0317028c2b Reorder load module stuff
Signed-off-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-30 07:03:34 +10:00
Alexandr Shadchin
8096183e9c Remove empty function xf86KbdUnplug
Signed-off-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-30 07:03:24 +10:00
Yasushi Oshima
ccf63a61f3 Add defines for Japanese 106-key USB keyboards.
Via http://gnats.netbsd.org/48347

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-23 18:11:06 +02:00
Peter Hutterer
13d320076e keyboard 1.8.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-keyboard-1.8.1
2015-04-07 09:24:38 +10:00
Peter Hutterer
65739ef047 linux: bring our process group to the foreground (#89653)
Required to make the driver receive keyboard events from the console.

X.Org Bug  <http://bugs.freedesktop.org/show_bug.cgi?id=89653>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Ingo Brückl <ib@wupperonline.de>
2015-03-27 08:53:36 +10:00
Alan Coopersmith
85fe6b8f56 Mark xf86OSKbdPreInit as _X_EXPORT in header to match definitions
Fixes Solaris Studio 12.4 compiler error:
"sun_kbd.c", line 512: redeclaration must have the same or more restrictive linker scoping: xf86OSKbdPreInit
cc: acomp failed for sun_kbd.c

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-03-22 14:26:00 -07:00
Peter Hutterer
d0c9619675 Init LEDs to zero before querying the value
This way if the ioctl fails we don't set any unintended LEDs, but really this
patch is more to silence valgrind:

==7129== Conditional jump or move depends on uninitialised value(s)
==7129==    at 0x8DF99A1: GetKbdLeds (lnx_kbd.c:79)
==7129==    by 0x8DF8853: InitKBD (kbd.c:291)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-08 14:51:28 +10:00
Egbert Eich
5a327955c9 Detangle inet keys and jp Henkan/ Muhenkan keys
When support for inet keys was added to the keyboard driver
back in the early 2000 none of the developers thought of
Japanese 106 key keybards which have two extra keys generating
the scan codes 0x79 and 0x7d.
So for keys prefixed with the scan code 0x60 which were not
remapped to anything else the line:
 *scanCode += 0x78;
was added.
Thus keys generating the scan codes 0xe0 0x01 and 0xe0 0x03
will overlap with the Henkan and Muhenkan keys on Japanese
keyboards.
A workaround was introduced to xkeyboard-config which makes
sure the keycodes 0x79 and 0x7d provide the Henkan and Muhenkan
keysyms. As a consequence users might loose some multimedia keys
on Japanese keyboards.
A different solution would be to either remap keycodes 0x79
and 0x7d or keycodes 0xe0 0x01 and 0xe0 0x03 into the range of
unused (X-)keycodes above 0xfb.
There are downsides with either solution: the legacy keyboard
driver and the xkb files would have to be fixed in sync. Otherwise
Japanese users would loose their Henkan and Muhenkan keys (in
the first case) or some multimedia keys would get lost.
The present patch does the latter which seems to be cleaner codewise.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-11 08:04:31 +10:00
Peter Hutterer
ddeb7940b9 keyboard 1.8.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-keyboard-1.8.0
2013-11-01 09:45:21 +10:00
Thomas Klausner
014101d157 Whitespace fixes.
Replace <SPACE><TAB> with <TAB>.
Remove whitespace at end-of-line.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-28 10:44:38 +10:00
Thomas Klausner
b8f4e70655 Check open() return value.
Suggested by Walter Harms <wharms@bfs.de>.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-18 16:47:18 -04:00
Thomas Klausner
dc9486a22f Factor out common code.
Suggested by Walter Harms <wharms@bfs.de>.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-18 16:41:13 -04:00
Thomas Klausner
2d6661d5c7 Do not assume type in WS_*_MAP_SIZE macros.
Suggested by Walter Harms <wharms@bfs.de>.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-18 16:41:13 -04:00
Thomas Klausner
6042ab2647 Add some NetBSD feature detection code.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-18 16:41:13 -04:00
Thomas Klausner
4f1a3cff9d Move WSCONS case inside switch statement.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-18 16:41:13 -04:00
Thomas Klausner
390c4621dd Improve auto-detection.
If WSKBDIO_GTYPE succeeds and returns type=0, it is a mux with no
keyboard attached. In this case, assume USB.

>From Jared McNeill <jmcneill@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-18 16:41:13 -04:00
Thomas Klausner
8ac42401a6 Fix wskbd handling when VT switching.
When using /dev/wskbd* we need to close the device when VT switching
out of X, and open it again when switching back.

>From Michael Lorenz <macallan@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-18 16:41:13 -04:00
Thomas Klausner
d61dcfd5c2 Make OpenKeyboard() warn instead of error out.
This way we can still setup keyboard map manually by xmodmap(1)
etc. on less well supported ports.

>From Izumi Tsutsui <tsutsui@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-18 16:41:13 -04:00