xref: /aosp_15_r20/external/libxkbcommon/README.md (revision 2b949d0487e80d67f1fda82db69e101e761f8064)
1*2b949d04SAndroid Build Coastguard Worker# libxkbcommon
2*2b949d04SAndroid Build Coastguard Worker
3*2b949d04SAndroid Build Coastguard Workerlibxkbcommon is a keyboard keymap compiler and support library which
4*2b949d04SAndroid Build Coastguard Workerprocesses a reduced subset of keymaps as defined by the XKB (X Keyboard
5*2b949d04SAndroid Build Coastguard WorkerExtension) specification.  It also contains a module for handling Compose
6*2b949d04SAndroid Build Coastguard Workerand dead keys and a separate library for listing available keyboard layouts.
7*2b949d04SAndroid Build Coastguard Worker
8*2b949d04SAndroid Build Coastguard Worker## Quick Guide
9*2b949d04SAndroid Build Coastguard Worker
10*2b949d04SAndroid Build Coastguard WorkerSee [Quick Guide](doc/quick-guide.md).
11*2b949d04SAndroid Build Coastguard Worker
12*2b949d04SAndroid Build Coastguard Worker## Building
13*2b949d04SAndroid Build Coastguard Worker
14*2b949d04SAndroid Build Coastguard Workerlibxkbcommon is built with [Meson](http://mesonbuild.com/):
15*2b949d04SAndroid Build Coastguard Worker
16*2b949d04SAndroid Build Coastguard Worker    meson setup build
17*2b949d04SAndroid Build Coastguard Worker    ninja -C build
18*2b949d04SAndroid Build Coastguard Worker    ninja -C build test  # Run the tests.
19*2b949d04SAndroid Build Coastguard Worker
20*2b949d04SAndroid Build Coastguard WorkerTo build for use with Wayland, you can disable X11 support while still
21*2b949d04SAndroid Build Coastguard Workerusing the X11 keyboard configuration resource files thusly:
22*2b949d04SAndroid Build Coastguard Worker
23*2b949d04SAndroid Build Coastguard Worker    meson setup build \
24*2b949d04SAndroid Build Coastguard Worker        -Denable-x11=false \
25*2b949d04SAndroid Build Coastguard Worker        -Dxkb-config-root=/usr/share/X11/xkb \
26*2b949d04SAndroid Build Coastguard Worker        -Dx-locale-root=/usr/share/X11/locale
27*2b949d04SAndroid Build Coastguard Worker    ninja -C build
28*2b949d04SAndroid Build Coastguard Worker
29*2b949d04SAndroid Build Coastguard Worker## API
30*2b949d04SAndroid Build Coastguard Worker
31*2b949d04SAndroid Build Coastguard WorkerWhile libxkbcommon's API is somewhat derived from the classic XKB API as found
32*2b949d04SAndroid Build Coastguard Workerin X11/extensions/XKB.h and friends, it has been substantially reworked to
33*2b949d04SAndroid Build Coastguard Workerexpose fewer internal details to clients.
34*2b949d04SAndroid Build Coastguard Worker
35*2b949d04SAndroid Build Coastguard WorkerSee the [API Documentation](https://xkbcommon.org/doc/current/modules.html).
36*2b949d04SAndroid Build Coastguard Worker
37*2b949d04SAndroid Build Coastguard Worker## Dataset
38*2b949d04SAndroid Build Coastguard Worker
39*2b949d04SAndroid Build Coastguard Workerlibxkbcommon does not distribute a keymap dataset itself, other than for
40*2b949d04SAndroid Build Coastguard Workertesting purposes.  The most common dataset is xkeyboard-config, which is used
41*2b949d04SAndroid Build Coastguard Workerby all current distributions for their X11 XKB data.  More information on
42*2b949d04SAndroid Build Coastguard Workerxkeyboard-config is available here:
43*2b949d04SAndroid Build Coastguard Worker    https://www.freedesktop.org/wiki/Software/XKeyboardConfig
44*2b949d04SAndroid Build Coastguard Worker
45*2b949d04SAndroid Build Coastguard WorkerThe dataset for Compose is distributed in libX11, as part of the X locale
46*2b949d04SAndroid Build Coastguard Workerdata.
47*2b949d04SAndroid Build Coastguard Worker
48*2b949d04SAndroid Build Coastguard Worker## Relation to X11
49*2b949d04SAndroid Build Coastguard Worker
50*2b949d04SAndroid Build Coastguard WorkerSee [Compatibility](doc/compat.md) notes.
51*2b949d04SAndroid Build Coastguard Worker
52*2b949d04SAndroid Build Coastguard Worker## Development
53*2b949d04SAndroid Build Coastguard Worker
54*2b949d04SAndroid Build Coastguard WorkerAn extremely rudimentary homepage can be found at
55*2b949d04SAndroid Build Coastguard Worker    https://xkbcommon.org
56*2b949d04SAndroid Build Coastguard Worker
57*2b949d04SAndroid Build Coastguard Workerxkbcommon is maintained in git at
58*2b949d04SAndroid Build Coastguard Worker    https://github.com/xkbcommon/libxkbcommon
59*2b949d04SAndroid Build Coastguard Worker
60*2b949d04SAndroid Build Coastguard WorkerPatches are always welcome, and may be sent to either
61*2b949d04SAndroid Build Coastguard Worker    <[email protected]> or <[email protected]>
62*2b949d04SAndroid Build Coastguard Workeror in a [GitHub](https://github.com/xkbcommon/libxkbcommon) pull request.
63*2b949d04SAndroid Build Coastguard Worker
64*2b949d04SAndroid Build Coastguard WorkerBug reports (and usage questions) are also welcome, and may be filed at
65*2b949d04SAndroid Build Coastguard Worker[GitHub](https://github.com/xkbcommon/libxkbcommon/issues).
66*2b949d04SAndroid Build Coastguard Worker
67*2b949d04SAndroid Build Coastguard WorkerThe maintainers are
68*2b949d04SAndroid Build Coastguard Worker- Daniel Stone <[email protected]>
69*2b949d04SAndroid Build Coastguard Worker- Ran Benita <[email protected]>
70*2b949d04SAndroid Build Coastguard Worker
71*2b949d04SAndroid Build Coastguard Worker## Credits
72*2b949d04SAndroid Build Coastguard Worker
73*2b949d04SAndroid Build Coastguard WorkerMany thanks are due to Dan Nicholson for his heroic work in getting xkbcommon
74*2b949d04SAndroid Build Coastguard Workeroff the ground initially.
75