- Keys from Linux ≤ 2.6.11. Most are TODOs made explicit.
- Add `XF86XK_MonBrightnessAuto` and make `XF86XK_BrightnessAuto` its
deprecated alias, for consistency with `XF86XK_BrightnessMin`
- Add `XF86XK_LinkPhone` from Linux 6.14
- Add `XF86XK_PerformanceMode" from Linux 6.17
- Fix and improve the keysym generator script
Co-authored-by: Pierre Le Marre <dev@wismill.eu>
Co-authored-by: Kai Uwe Broulik <kde@privat.broulik.de>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/103>
Some keysyms were renamed compared to their Linux kernel counterparts,
to avoid names that are too ambiguous. Names are inspired by the “HID
usage table for USB”.
Some keys were left unmapped due to their ambiguous function.
Also fixed the keysyms script to handle minor new use cases.
Miscellaneous notes:
- `KEY_CHANNEL`: Described as “Go to the next favorite channel” in the
Linux RC tables, thus mapped to `XF86XK_NextFavorite`.
- `KEY_PVR`: The accronym means “personal video recorder”, but there
are multiple comments in the kernel refering to it as “Media Select
Home”.
- `KEY_MODE`: Described as labelled "MONO/STEREO" with the function
"Change sound mode" in the Linux RC tables, thus mapped to the more
explicit `XF86XK_AudioChannelMode`.
- `KEY_DIGITS`: Describe as “Use more than one digit for channel”, it
denotes various number entry modes that depend on the device, thus
mapped to the more explicit `XF86XK_NumberEntryMode`, inspired by its
entry in the CEC protocol.
Resources:
- Linux Remote controller tables:
https://www.kernel.org/doc/html/v6.14/userspace-api/media/rc/rc-tables.html
- Linux HID key mmappings:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-input.c
- HID Usage Tables for USB:
https://usb.org/sites/default/files/hut1_6.pdf
- Kodi: https://github.com/xbmc/xbmc
Co-authored-by: Oliver Gerlich <oliver.gerlich@gmx.de>
Co-authored-by: Pierre Le Marre <dev@wismill.eu>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/93>
Try to follow the X11 general guidelines more closely:
> Keysyms identify characters or *functions* associated with each key.
> […] This file assigns *mnemonic* macro names for these keysyms.
> [Keysym design] makes it easier to write a *portable* application.
Key points:
- Better naming is better self-documentation: abstruse keynames and
jargon (e.g. acronyms) may lead to misuse.
- Keysyms share a common namespace: generic names should be reserved
to actual generic functions, else it is better to use a relevant
prefix, e.g. `XF86XK_OK` is acceptable but `XF86XK_Title` is ambiguous
and better renamed with the prefix `Media`: `XF86XK_MediaTitleMenu`.
- Lookup the evdev keys is kept simple thanks to the strict formatting
rules.
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/93>
Can be used to tell the compiler that fallthrough between cases in
a switch statement is intentional. Handles gcc >= 7 and clang >= 12
as well as all C23-compliant compilers.
Bumps xproto version to 7.0.34.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/96>
avoids a bunch of warnings when building against musl libc that warns
on this pedantically:
```
In file included from /usr/include/X11/Xpoll.h:166:
/usr/include/sys/poll.h:1:2: warning: redirecting incorrect #include <sys/poll.h> to <poll.h> [-W#warnings]
```
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/92>
This header needs a bunch of types defined in Xmd.h. Consumers currently
need to explicitly care about correct include order, which isn't exactly
gently programming style. Instead headers should include anything they
need themselves.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/90>
This header needs a bunch of types defined in Xmd.h. Consumers currently
need to explicitly care about correct include order, which isn't exactly
gently programming style. Instead headers should include anything they
need themselves.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/90>
Adds an augmented version of PresentPixmap supporting explicit
synchronization with a direct rendering device. This takes the form of
timeline DRM synchronization objects, along with acquire and release
points on those timelines. Implementations advertising
PresentCapabilitySyncobj will wait for the acquire point to be signaled
before executing the PresentPixmap request, and signal the release point
after any GPU operations on the pixmap have completed.
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Adds new protocol to the DRI3 extension for importing DRM
synchronization objects provided by clients. These can be used to enable
explicit synchronization between the client, the direct rendering
device, and the server.
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Recent removals & deprecations of keysyms have caused quite a lot of
trouble:
- Removed keysyms *were* used in the wild, especially the dead keys:
e.g. in Neo-like and Bépo-like layouts.
While checking for keysyms use in xkeyboard-config database is a
mandatory first step, it is not enough.
- Removed keysyms broke Qt build.
- Deprecated names are now replaced by their new non-deprecated version.
It is problematic in the case that a sandbox application (e.g. with
flatpak) uses X11 or xkbcommon libraries older than the system’s one:
they are not able to parse the new names.
For the sake of the stability, this commit restore all previous keysyms
and introduces the new names as alternative. While the comments mark
some names as “deprecated”, they will remain the canonical names (i.e.
they are *output* by `xkbcomp` and `xkbcommon`) for the next 10 years.
Details of the modified commits:
- "keysymdef.h: add better names for the dead schwa and SCHWA symbols"
(commit e5cccecd81)
- "keysymdef.h: delete four symbolic names that serve no purpose"
(commit cb44799b72)
- "keysymdef.h: name the masculine ordinal indicator similar to feminine one"
(commit 3ddfc98036)
- "keysymdef.h: add correctly spelled names for the left and right guillemet"
(commit 8cfcc91a3f)
Mark some alias deprecated, as per keysymdef.h rules.
Notable changes:
- HP deprecated aliases.
- Ooblique, ooblique: deprecated in favor more explicit names.
- Arabic_farsi_yeh: deprecated, could induce in error with Arabic_yeh.
- Greek_LAMBDA, Greek_lambda: non deprecated aliases, as there seem to
be not common agreeement between standard and literature.
- Armenian_verjaket, Armenian_but, Armenian_yentamna, Armenian_amanak,
Armenian_shesht, Armenian_paruyk: deprecated in favor of the Unicode
name. Currently not used in xkeyboard-config.
- Normalize codepoint format to upper case.
- Fix Unicode standard names: use *corrected* names.
- Add missing Unicode mappings (see hereinafter).
Some special keysyms have Unicode mappings in both X11 and xkbcommon,
but they are not documented. As these mappings are not one-to-one, we
introduce the concepts of generic/specific compatible semantics:
- Generic keysyms such as as `Space` have a standard Unicode annotation;
- Specialized keysyms such as `KP_Space` have the same standard Unicode
annotation between angle brackets.
- Harmonize format by using lower case hexadecimal notation.
- Normalize keysym padding: use spaces instead of tabulations
with the same amount everywhere.
- Update generator to new format.
- `Greek_IOTAdiaeresis`: make clear that the keysym is deprecated
(due to a typo).
- `Thai_maihanakat_maitho`: there is a Unicode mapping to U+0E3E in
both libx11 and xkbcommon, but the code point is unassigned.
Document this mapping and deprecate the keysym.
The documentation on deprecated keysyms lacks precision for two cases,
which are fixed by this commit:
- Explicit aliases (comment: “alias for XXX”) are not deprecated.
- A keysym can be explicitly deprecated by starting its comment with
“deprecated”.
It is intended to be added to the ara(mac-phonetic) and my(phonetic) layouts on
the <BKSL> key. They are based on the following layouts listed in the CLDR:
- https://github.com/unicode-org/cldr/blob/main/keyboards/osx/ar-t-k0-osx-qwerty.xml
- https://github.com/unicode-org/cldr/blob/main/keyboards/osx/ms-t-k0-osx.xml
In CLDR, the dead keys are defined in the <transforms> section. Hamza “ء” is
used there in the first position, making it a dead key. Now, among the keys
that produce this character, E02 has transform="no" while D13 has not. So hamza
on D13 is a dead key but it is not on E02.
The compose sequences required for the mentioned layouts are intended to be
added to libX11. Specifically, dead_hamza with alef, waw and yeh to generate
hamzaonalef, hamzaonwaw, and hamzaonyeh, respectively. Additional sequences
might be added as necessary.
Bump the presentproto version to 1.3 in the pkg-config file,
presentproto.txt and presenttokens.h.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Fixes: 5a3d5d624 - present: add PresentOptionAsyncMayTear
This is intended to be used by screen lockers, where the server must
exit if the screen locker does, to avoid a security hole. As suggested
by Alan Coopersmith, this is implemented using a new flag for the
disconnect mode of the XFixes extension. Includes wording suggestions
from Peter Hutterer.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
Adding index() and rindex() as macros wreaks havoc with several libc++
headers, which liberally use the name 'index' for variables, functions,
and more. Get the declarations from <strings.h> instead, where they have
been for at least two decades.
Signed-off-by: Dimitry Andric <dimitry@andric.com>
The new names (`dead_schwa` and `dead_SCHWA`) fit much better with
the `dead_a`, `dead_A` scheme for the other vowels, and also with
how other upper- and lowercase schwa symbols are named.
The old names are deprecated, and can be removed quite soon because
they are not used anywhere -- not in xkeyboard-config at least.
(The dead vowel symbols were introduced fifteen years ago in commit
935dd37be4, to support compose sequences for Amharic, but neither
libX11 nor xkeyboard-config were ever updated to make use of them.)
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Ten years ago, in commit 6d4acb0e3a, these four keysyms were added
to support new compose sequences that then could be typed with the
newish German T3 layout -- or at least, that was the intention.
The commit was in response to https://bugs.freedesktop.org/62189,
right before I retracted the patch after learning that there are no
precomposed characters that use those four symbols as diacritics.
The commit should have been reverted then, but... it lingered and
was forgotten. No layout in xkeyboard-config uses these symbols
(obviously, as they serve no purpose) and meanwhile the T3 layout
itself has become obsolete [1], so... it's time to clean up.
[1] https://de.wikipedia.org/wiki/DIN_2137#Neufassung_2018
"die Belegung T3 wird nicht mehr definiert, da die Erfahrung gezeigt
hat, dass eine solche Tastatur ohnehin nicht produziert wird"
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
They have been deprecated for more than twenty years,
and were either misspelled or too specifically named.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
The symbolic name for the feminine ordinal indicator is 'ordfeminine',
so the name for the masculine ordinal indicator should be 'ordmasculine'
instead of just 'masculine'. Deprecate this latter form.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
And deprecate the misspelled ones -- guillemots are seabirds [1],
guillemets are the sideways double chevrons [2].
[1] https://en.wikipedia.org/wiki/Guillemot
[2] https://en.wikipedia.org/wiki/Guillemet
This will allow to finally use properly spelt symbol names
in the layouts of xkeyboard-config.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Fixes compiler errors of "unexpected ';' before ')'" when calling
the SIZEOF macro on XvMC requests.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
We could not find any evidence it was ever used, but defining it
caused C++11 compilers to complain:
/usr/X11R6/include/X11/Xfuncproto.h:173:24:
warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
#define _X_NONNULL(args...) __attribute__((nonnull(args)))
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This extension exists to serve one purpose: reliably identifying
Xwayland. Previous attempts at doing so included querying root window
properties, output names or input device names. All these attempts are
somewhat unreliable. Instead, let's use an extension - where that
extension is present we have an Xwayland server.
Clients should never need to do anything but check whether the extension
exists through XQueryExtension/XListExtensions.
This extension provides a single QueryVersion request only, and
that is only to provide future compatibility if we ever need anything
other than "this extension exists" functionality.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Workaround the collision between ControlMask #defined in X11/X.h and
ControlMask used as the name of a structure member in
w32api/processthreadsapi.h in w32api 10.0.0
DRI3SetDRMDeviceInUse is a hint that lets a client tell the server
what DRM device it is currently using. This lets the server make
more informed decisions for what modifiers to return to the client.
This is needed for proper linux dmabuf feedback with Xwayland
All modern compilers (GCC>=4.6, Clang>=3.0) define this macro, so we can
use it to detect 64-bit longs without adding to the architecture list.
This change allows me to successfully run a simple X11 window on a
64-bit FreeBSD RISC-V QEMU VM via SSH forwarding. Without this change
I get an error that DISPLAY cannot be opened.
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>