|
a1770132
|
2023-09-25T11:41:48
|
|
Compose: add iterator API
Allow users to iterate the entries in a compose table. This is useful
for other projects which want programmable access to the sequences,
without having to write their own parser.
- New API:
- `xkb_compose_table_entry_sequence`;
- `xkb_compose_table_entry_keysym`;
- `xkb_compose_table_entry_utf8`;
- `xkb_compose_table_iterator_new`;
- `xkb_compose_table_iterator_free`;
- `xkb_compose_table_iterator_next`.
- Add tests in `test/compose.c`.
- Add benchmark for compose traversal.
- `tools/compose.c`:
- Print entries instead of just validating them.
- Add `--file` option.
- TODO: make this tool part of the xkbcli commands.
Co-authored-by: Pierre Le Marre <dev@wismill.eu>
Co-authored-by: Ran Benita <ran@unusedvar.com>
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
417d0747
|
2023-09-18T18:17:39
|
|
Add xkb-check-messages tool
This tool checks whether messages codes are supported.
This is useful e.g. for CI, where one may want to grep for some XKB
error codes and ensure that these are still supported.
|
|
ef81d04e
|
2023-09-18T18:17:34
|
|
Structured log messages with a message registry
Currently there is little structure in the log messages, making
difficult to use them for the following use cases:
- A user looking for help about a log message: the user probably
uses a search engine, thus the results will depend on the proper
indexing of our documentation and the various forums. It relies
only on the wording of the message, which may change with time.
- A user wants to filter the logs resulting of the use of one of the
components of xkbcommon. A typical example would be testing
xkeyboard-config against libxkbcommon. It requires the use of a
pattern (simple words detection or regex). The issue is that the
pattern may become silently out-of-sync with xkbcommon.
A common practice (e.g. in compilers) is to assign unique error codes
to reference theses messages, along with an error index for
documentation.
Thus this commit implements the following features:
- Create a message registry (message-registry.yaml) that defines the
log messages produced by xkbcommon. This is a simple YAML file that
provides, for each message:
- A unique numeric code as a short identifier. It is used in the
output message and thus can be easily be filtered to spot errors
or searched in the internet. It must not change: if the
semantics of message changes, it is better to introduce a new
message for clarity.
- A unique text identifier, meant for two uses:
1. Generate constants dealing with log information in our code
base.
2. Generate human-friendly names for the documentation.
- A type: currently warning or error. Used to prefix the constants
(see hereinabove) and for basic classification in documentation.
- A short description, used as concise and mandatory documentation.
- An optionnal detailed description.
- Optional examples, intended to help the user to fix issues
themself.
- Version of xkbcommon it was added. For old entries this often
unknown, so they will default to 1.0.0.
- Version of xkbcommon it was removed (optional)
No entry should ever be deleted from this index, even if the message
is not used anymore: it ensures we have unique identifiers along the
history of xkbcommon, and that users can refer to the documentation
even for older versions.
- Add the script update-message-registry.py to generate the following
files:
- messages.h: message code enumeration for the messages currently
used in the code base. Currently a private API.
- message.registry.md: the error index documentation page.
- Modify the logging functions to use structured messages. This is a
work in progress.
|
|
0e3e2d17
|
2023-09-18T12:17:11
|
|
interactive-evdev: add option to print modmaps
Add an option to print modmap and vmodmap of relevant keys, as well as
virtual modifiers mapping to real modifier. This is useful for debugging.
It uses private API, so we compile it separately in the fashion of
`xkbcli-compile-keymap/compile-keymap`.
|
|
fe9cd66f
|
2023-09-18T13:17:30
|
|
Test: Enable x11comp and use the xvfb wrapper
This test was previously disabled in 914e84e0188b5fbd67855f38f4499bb1412f4516.
Note that it requires a recent version of xkeyboard-config to succeed.
|
|
26b1a076
|
2023-09-18T13:17:17
|
|
Test: Use a xvfb wrapper for x11 test
The x11 test is currently silently skipped in CI, because it requires a
running X server.
Create a xvfb wrapper to run the test. We do not use `xvfb-run`, because
it is a shell script and it causes valgrind to detect unrelated memory
issues in the shell (dash, bash).
Improve wrapper using a special ELF section
TODO: The wrapper is intended to be used with the x11comp test as well.
|
|
37fdd87c
|
2023-06-27T20:31:01
|
|
Add a meson flag to make cool URIs optional
The script `ensure-stable-doc-urls.py` relies on the Doxygen output files
names. These may change between Doxygen versions, although the Doxygen
developers intend stability.
Since the script is useful mainly for the online documentation of
xkbcommon, make the target `doc-cool-uris` optional.
|
|
64aaa7cd
|
2023-05-14T15:11:15
|
|
Add support for stable doc URLs (#342)
Doc URLs may change with time because they depend on Doxygen machinery.
This is unfortunate because it is good practice to keep valid URLs
(see: https://www.w3.org/Provider/Style/URI.html).
I could not find a built-in solution in Doxygen, so the solution proposed
here is to maintain a registry of all URLs and manage legacy URLs as
redirections to their canonical page.
This commit adds a registry of URLs that has three functions:
- Check no previous URL is now invalid.
- Add aliases for moved pages.
- Generate redirection pages for aliases. The redirection works with
a simple <meta http-equiv="refresh"> HTML tag. See:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv
This commit also initialize the URLs registry with current pages and some
redirections needed after recent documentation refactoring.
Finally, the CI is updated to catch any change that invalidate previous
URLs.
|
|
fc664cf1
|
2023-05-13T05:30:11
|
|
Improve documentation
- Add introduction to XKB
- Embrace Doxygen features
- More cross links
|
|
e020174a
|
2023-05-05T10:52:07
|
|
build: show a summary
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
80be81e5
|
2023-05-05T10:16:30
|
|
build: require bison >= 2.3a
At least 2.3 (released 2006) which is the version shipped with macos
doesn't work. Reading the changelog I think 2.3a *should* work, so
require that.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
60d38b0c
|
2023-05-05T10:11:00
|
|
build: bump required meson to 0.52.0
Support for version checks in `find_program()`.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
46b7753f
|
2023-05-02T23:47:56
|
|
meson.build: register libxkbcommon.dylib link
meson needs to know that the executable tools
link against libxkbcommon.dylib so that the
@rpath references used during the build/test phases
can be rewritten to full path names on install
|
|
5b5b67f2
|
2023-05-01T22:30:41
|
|
Add support for modmap None (#291)
Unlike current xkbcommon, X11’s xkbcomp allows to remove entries in
the modifiers’ map using “modifier_map None { … }”.
“None” is translated to the special value “XkbNoModifier” defined in
“X11/extensions/XKB.h”. Then it relies on the fact that in "CopyModMapDef",
the following code:
1U << entry->modifier
ends up being zero when “entry->modifier” is “XkbNoModifier” (i.e. 0xFF).
Indeed, it relies on the overflow behaviour of the left shift, which in
practice resolves to use only the 5 low bits of the shift amount, i.e.
0x1F here. Then the result of “1U << 0xFF” is cast to “char”, i.e. 0.
This is a good trick but too magical, so in libxkbcommon we will use
an explicit test against our new constant XKB_MOD_NONE.
|
|
0e9c2ec9
|
2023-04-30T21:30:36
|
|
Improve the doc of the XKB keymap text format, V1 (#321)
- Add table of contents
- Add terminology section
- (WIP) Add Introduction to the format
- Improve the keycode section
- Improve the interpret section
- Add guide to create and use modifiers
- (WIP) Add actions documentation
- Add cross-references
- Add keysyms header to documentation
|
|
5b5ec0ee
|
2023-02-18T11:01:30
|
|
build: override dependency for use as subproject
This allows xkbcommon to be used as a subproject.
Signed-off-by: Simon Ser <contact@emersion.fr>
|
|
cecaa01d
|
2023-01-02T21:23:05
|
|
Bump version to 1.5.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
233617d0
|
2023-01-02T21:10:45
|
|
build: fix wayland-scanner deprecation code -> private-code
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
e5444f41
|
2022-12-16T21:24:57
|
|
build: require meson >= 0.51, fix meson deprecations
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
9d1043dc
|
2022-12-14T18:21:13
|
|
build: remove -fsanitize-undefined-trap-on-error
Meson complains; it's probably not that important anymore when using the
`-Db_sanitize` options.
meson.build:36: WARNING: Consider using the built-in option for sanitizers instead of using "-fsanitize-undefined-trap-on-error".
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
2530f644
|
2022-09-24T10:30:00
|
|
build: reenable test-context in MSVC
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
f9858bf5
|
2022-09-24T10:27:51
|
|
test: move mkdir & mkdtemp calls to common place and fix them on MSVC
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
57af9cb7
|
2022-05-21T22:55:10
|
|
Bump version to 1.4.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
ea6580cc
|
2022-02-04T12:41:50
|
|
Bump version to 1.4.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
8531ea72
|
2021-10-08T09:51:10
|
|
build: add enable-tools option
this is mainly useful for multilib, but may be useful for other users as well
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
|
|
88222c8d
|
2021-09-10T22:51:34
|
|
Bump version to 1.3.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
b6aadd57
|
2021-05-08T21:30:52
|
|
tools: add compose tool for Compose debugging
Not very useful so not exposed in xkbcli.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
13ba9135
|
2021-05-01T23:51:23
|
|
Bump version to 1.3.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
baf55226
|
2021-04-08T10:51:07
|
|
bench: add atom benchmark
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
9d87f849
|
2021-04-27T10:53:36
|
|
build: fix missing includes
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
de1b6943
|
2021-04-27T10:10:26
|
|
Move include files to include/ subdirectory
This way we don't specify `include_directorories('.')` which brings in
more than needed.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
8ff0232b
|
2021-04-27T10:02:00
|
|
build: move the subproject variables to a common section at the end
As suggested in:
https://github.com/xkbcommon/libxkbcommon/pull/240#discussion_r620784021
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
4238417b
|
2021-04-26T17:27:01
|
|
Meson: Allow building as subproject
Specify where to find the headers for libxkbcommon_dep,
libxkbcommon_x11_dep, and libxkbregistry_dep, which allows other
projects to correctly locate the headers when libxkbcommon is being
built as a Meson subproject.
The dep_libxkbregistry variable is renamed to libxkbregistry_dep,
to follow the usual convention for variables which hold declared
dependencies to be used from subproject builds.
|
|
5cd76a8d
|
2021-04-26T17:38:48
|
|
Windows: Pass list of symbols to export to MSVC
Arrange for passing .def files with the lists of symbols to export from
DLLs when building on Windows with MSVC. Without this no symbols were
being exported at all.
The .def files are generated from the .map files at build time using
scripts/map-to-def, which avoids needing to maintain two different sets
of files.
|
|
097a0ca7
|
2021-04-07T19:23:55
|
|
Bump version to 1.2.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
086353b3
|
2021-04-02T22:12:00
|
|
Bump version to 1.2.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
90e2d5ee
|
2021-03-30T20:08:42
|
|
build: require C11
I'd really like to use anonymous unions/structs. Supposedly even MSVC
supports it now. Let's try and see.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
82a5bdc4
|
2021-02-27T22:48:12
|
|
Bump version to 1.1.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
83e3a53d
|
2021-02-27T22:38:21
|
|
doc: add keymap-format-text-v1.md to the HTML documentation
It's incomplete but might be helpful for someone.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
d1ba81c4
|
2021-02-22T20:07:45
|
|
meson.build: replace the remaining join_paths() with the nicer / syntax
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
0abd430e
|
2021-02-22T12:54:15
|
|
test: add a keysym tester
A simple script that creates a new layout with the given keysym replacing TLDE.
Then we compile a keymap and search for the keysym being assigned to TLDE and
bail if that fails.
The list of keysyms is manually maintained but we only need to add one or two to
spot-check whenever the xorgproto is updated.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
c60b77ea
|
2020-11-23T20:30:13
|
|
Bump version to 1.0.3
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
13e6543e
|
2020-11-20T21:01:56
|
|
Bump version to 1.0.2
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
1bd3b3c7
|
2020-11-19T00:28:37
|
|
x11: cache X11 atoms
On every keymap notify event, the keymap should be refreshed, which
fetches the required X11 atoms. A big keymap might have a few hundred of
atoms.
A profile by a user has shown this *might* be slow when some intensive
amount of keymap activity is occurring. It might also be slow on a
remote X server.
While I'm not really sure this is the actual bottleneck, caching the
atoms is easy enough and only needs a couple kb of memory, so do that.
On the added bench-x11:
Before: retrieved 2500 keymaps from X in 11.233237s
After : retrieved 2500 keymaps from X in 1.592339s
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
9caa4128
|
2020-11-19T16:15:42
|
|
build: combine test & bench internal deps
No need to duplicate this really.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
2c295b10
|
2020-09-11T15:07:39
|
|
Bump version to 1.0.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
6178924f
|
2020-09-07T12:27:26
|
|
test/tool-option-parsing: skip testing of disabled tools
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
737030ad
|
2020-09-07T12:19:17
|
|
build: move tests to after tools
So tests can refer to stuff set by the tools section.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
13745014
|
2020-09-07T19:24:12
|
|
test: include unstd.h in the registry test to cut down the MacOS warnings
mkdtmp, rmdir and unlink are in unstd.h on MacOS. Since including that it
doesn't hurt us on Linux, let's do it without ifdefs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
12f99d0d
|
2020-09-05T22:57:42
|
|
Bump version to 1.0.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
66e7f0da
|
2020-09-03T08:30:45
|
|
Revert: tools: add xkbcli-scaffold-new-layout as helper tool
While this tool is useful for users starting with a new keyboard layout, it is a
somewhat bad fit for libxkbcommon. It's the only python tool, we don't even
install it yet (because we're not sure yet what it's supposed to do) and there's
a potential for it to expand into more corner cases.
The only tie it has to libxkbcommon is that it templates the data files that
libxkbcommon reads, but those files are effectively public API.
Let's remove this tool from there and instead move it to a separate git
repository where it can go its own way.
This reverts commit d00cf64dbc586a1052e1f0d0e7f1a48bbff293ec
|
|
4d0d5091
|
2020-08-31T08:36:38
|
|
meson.build: define PATH_MAX where it's missing
PATH_MAX is not POSIX and can be missing on some systems, notably Windows (which
provides MAX_PATH instead tough) and Hurd. Let's define it to a sane value where
missing, i.e. the one it's defined to in limits.h. Except on Windows where
we're limited to 260.
Fixes https://github.com/xkbcommon/libxkbcommon/issues/180
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
e50c3e2c
|
2020-08-30T21:54:21
|
|
build: fix meson "uses features which were added in newer versions" warning
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
d00cf64d
|
2020-07-10T11:32:48
|
|
tools: add xkbcli-scaffold-new-layout as helper tool
This tool set ups the required directory structure and template files to add new
keyboard layouts or options. For example, run like this:
xkbcli-scaffold-new-layout --layout 'us(myvariant)' --option 'custom:foo'
This will up the evdev rules file, the evdev.xml file, the symbols/us file and
symbols/custom file in $XDG_CONFIG_HOME so that the user has everything in place
and can start filling in the actual key mappings.
This tool is currently uninstalled until we figure out whether it's useful.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
d7b39f6f
|
2020-07-10T08:50:02
|
|
Add /etc/xkb as extra lookup path for system data files
This completes the usual triplet of configuration locations available for most
processes:
- vendor-provided data files in /usr/share/X11/xkb
- system-specific data files in /etc/xkb
- user-specific data files in $XDG_CONFIG_HOME/xkb
The default lookup order user, system, vendor, just like everything else that
uses these conventions.
For include directives in rules files, the '%E' resolves to that path.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
a0c1c2f4
|
2020-08-08T14:35:36
|
|
build: fix byacc invocation
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/133#issuecomment-670902025
Reported-by: Edward-0
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
608e9361
|
2020-07-25T16:30:39
|
|
tools: run test-tool-option-parsing.py like a regular test
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
00530bea
|
2020-07-25T16:06:40
|
|
build: use gnu_symbol_visibility instead of explicit -fvisibility
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
61772c77
|
2020-07-25T16:01:00
|
|
build: use nicer / syntax instead of join_paths()
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
0066e387
|
2020-07-25T15:49:17
|
|
tools: make independent from src/
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
d67c9cff
|
2020-07-25T15:24:40
|
|
build: use cc.get_supported_arguments()
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
0615c911
|
2020-07-25T15:15:31
|
|
build: remove explicit -Wextra
Implied by `warning_level=2`.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
f439ce18
|
2020-07-25T11:17:11
|
|
tools: some minor changes to xkbcli
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
cd119a28
|
2020-07-23T09:37:15
|
|
Drop use of ronn, switch to raw roff instead
Drop the ronn source files, check in the generated files instead. This gets rid
of the ruby+gem+ronn toolchain requirement at the cost of having to edit raw man
pages.
ronn files are as-generated but with the preamble and generation date removed.
The latter isn't important enough to keep, it'll just go stale for manually
maintained files and it's not worth setting up a configure_file() just for that
date.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
d480f053
|
2020-07-13T15:38:50
|
|
tools: add a test program to parse the commandline options
A pytest wrapper around our xkbcli tool - copied from libinput.
This calls our various xkbcli tools with varying options and check that they
either succeed or return the right error code. The coverage is limited, it
does not (and cannot) test for all possible combinations but it should provide a
good red flag if we have inconsistent behavior or accidentally break some
combination of flags.
Meanwhile, we can at least assume that all our commandline arguments are parsed
without segfaulting or worse.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
449ed2b8
|
2020-07-13T12:28:43
|
|
tools: drop getopt vs getopt_long differentiation
On all platforms we build on where getopt.h is available, getopt_long is also
available. Only Windows doesn't have either but that's no reason for us to
differentiate between the two.
If we need to special-case getopt vs getopt_long, it's probably better to
implement our own cross-platform version of it and use that.
Fixes #161
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
ab3be693
|
2020-07-13T12:13:23
|
|
tools: switch interactive-evdev to getopt_long
Requiring long options for this tool means it's immediately obvious what an
invocation does, compare e.g.
xkbcli interactive-evdev -gcd
to the equivalent:
xkbcli interactive-evdev --consumed-mode=gtk --enalbe-compose --report-state-changes
This drops the evdev offset argument - that offset should never be anything
other than 8, having this as argument here is more likely to confuse or
produce misleading debugging logs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
29e80e7b
|
2020-07-08T13:30:47
|
|
tools: install our tools as xkbcli subcommands
The xkbcli tool usage help is ifdef'd out where the tool isn't built but the
man page always includes all tools. Easier that way.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
ed57fb8b
|
2020-07-08T12:51:54
|
|
tools: add a xkbcli tool as entry point for the various tools we have
This is the base tool, no subtools are currently connected so you only get help
and version for now. The goal here is to have a git-like infrastructure where
/usr/bin/xkbcli is the main tool, anything else will hide in libexec.
The infrastructure for this is copied from libinput. Tools themselves will
will be installed in $prefix/libexec/xkbcommon and the xkbcli tool forks
off whatever argv[1] is after modifying the PATH to include the libexec dir.
libinput has additional code for checking whether we're running this from the
builddir but it's a bit iffy and it's usefulness is limited - if you're in the
builddir anyway you can just run ./builddir/xkbcli-<toolname> directly.
So for this code here, running ./builddir/xkbcli <toolname> will execute the
one in the prefix/libexecdir.
Since we want that tool available everywhere even where some of the subtools
aren't present, we need to ifdef the getopt handling.
man page generation is handled via ronn which is a ruby program but allows
markdown for the sources. It's hidden behind a meson option to disable where
downloading ronn isn't an option. The setup is generic enough that we can add
other man-pages by just appending to the array.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
1b796a72
|
2020-07-09T13:52:58
|
|
meson.build: move registry-list tool down to the tools section
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
10a881a4
|
2020-07-09T13:31:20
|
|
meson.build: only build the tools where getopt.h is available
Windows doesn't have getopt.h. This would prevent building the tools but
they are behind other checks that cause them to be disabled. The only tools
that don't need getopt.h are interactive-wayland and interactive-x11 but
neither is particularly useful on Windows. Just hide all tools behind the getopt
check in preparation for the upcoming tool consolidation work.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
76d847ac
|
2020-07-08T12:35:23
|
|
meson.build: move the config.h generation to the bottom
We cannot add to configh_data after this command so let's generate this last.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
90ece8fb
|
2020-07-09T11:06:23
|
|
meson.build: registry list is dependent on getopt_long
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
9cff8df2
|
2020-07-09T12:24:22
|
|
meson.build: drop install:false from configure_file
meson complains because this requires 0.50.0 and we don't require that. But
since it defaults to false anyway, let's just omit it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
ce5eb1ac
|
2020-07-24T13:31:03
|
|
tools: link the tools against libxkbcommon.so only
The tools previously linked against a static version (by simply recompiling
everythiong). This isn't necessary, we can link them against libxkbcommon.so.
Only exception: The xbkcli-compile-keymap tool needs a private API for the
--kccgst flag. Avoid this by disabling this flag in the installed tool and
building the same tool, statically linked but not-installed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
c3d42390
|
2020-07-23T09:04:10
|
|
meson.build: add the valgrind test setup, exclude python tests
This way we can invoke the expected setup with
meson test --setup=valgrind
And because we don't care about valgrinding python script, mark that test as
part of the "python-tests" suite and skip it during our CI valgrind run.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
2a834305
|
2020-07-23T09:22:51
|
|
meson.build: fix pkgconfig deprecation warning
../meson.build:239: DEPRECATION: Library xkbcommon was passed to the "libraries"
keyword argument of a previous call to generate() method instead of first
positional argument. Adding xkbcommon to "Requires" field, but this is a
deprecated behaviour that will change in a future version of Meson. Please
report the issue if this warning cannot be avoided in your case.
This was introduced in meson 0.49.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
fa300b24
|
2020-07-22T11:47:15
|
|
test: fix Windows CI by rewriting symbols-leak-test from bash to python
The CI started installing some wrapper instead of a real bash which is
what gets found.
See:
https://github.com/actions/virtual-environments/pull/1081
Given meson is written in python, it should always be available
hopefully.
Disabled valgrind wrapper for now because it now also applies to the
python interpreter which leaks like a sieve.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
fc2d4fa2
|
2020-07-07T11:43:08
|
|
tools: add ability to compile from kccgst to rmlvo-to-keymap
This obsoletes the print-compiled-keymap tool though we now require that the
kccgst components are passed via stdin, there is no file loading ability.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
fd391471
|
2020-07-07T10:40:05
|
|
tools: add ability to print the KcCGST components for rmlvo-to-keymap
This makes the rmlvo-to-kccgst tool obsolete.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
e55587f4
|
2020-07-08T09:12:23
|
|
meson.build: always set the default variants/options
Make this more balanced with the rules/layouts so we can rely on that #define to
exist.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
afb26e7d
|
2020-05-12T14:09:50
|
|
Add libxkbregistry to query available RMLVO
This library is the replacement for clients parsing evdev.xml directly.
Instead, they should use the API here so that in the future we may even
be able to swap evdev.xml for a more suitable data format.
The library parses through evdev.xml (using libxml2) and - if requested -
through evdev.extras.xml as well. The merge approach is optimised for
the default case where we have a system-installed rules XML and another file in
$XDG_CONFIG_DIR that adds a few entries. We load the system file first, then
append any custom ones to that. It's not possible to overwrite the MLVO list
provided by the system files - if you want to do that, get the change upstream.
XML validation is handled through the DTD itself which means we only need to
check for a nonempty name, everything else the DTD validation should complain
about.
The logging system is effectively identical to xkbcommon.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
9b1b0c57
|
2020-06-16T10:34:07
|
|
Add a snprintf_safe() helper function
Returns true on success or false on error _or_ truncation. Since truncation is
almost always an error anyway, we might as well make this easier to check.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
362130de
|
2020-06-23T16:32:05
|
|
meson.build: prefix all tools with xkbcommon-
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
3adbe54e
|
2020-06-23T16:20:08
|
|
tools: move the remaining tools from test to here
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
f525f9f0
|
2020-06-23T16:25:50
|
|
test: disentangle interactive-wayland from the test headers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
1326d5ad
|
2020-06-23T16:23:24
|
|
test: untangle interactive-x11 from the test headers
Use the new tools headers and create a custom internal lib for the x11 tool.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
c09bf363
|
2020-06-23T14:01:48
|
|
test: untangle interactive-evdev from the test headers
Move (sometimes duplicate) the required bits into new shared files
tools-common.(c|h) that are compiled into the internal tools library. Rename the
test_foo() functions to tools_foo() and in one case just copy the code of the
keymap compile function to the tool.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
6c629a10
|
2020-06-23T15:56:16
|
|
Use a custom internal library for the tools
This is currently identical to the internal test library, but it's a start to
disentangle the two.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
ec2bbe59
|
2020-06-22T13:07:46
|
|
Move the various tools to a tools/ directory
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
5fb2c676
|
2020-06-02T16:18:47
|
|
doc: add documentation for user configuration
Most of this is currently hidden in the commit message for ca033a29d2ca, let's
make it a bit more public so we have a link to point users to.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
a2657874
|
2020-06-02T16:11:33
|
|
doc: add the rules-format file (as markdown)
Useful to have this as part of the documentation. The rendering isn't great but
at least not any worse than pure text. Markdown escapes % so explaining our use
of %S and %H would require a double % - not idea. Let's just wrap it as a code
block and done.
Includes two typo fixes too, yay.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
908e014f
|
2020-04-10T16:32:13
|
|
Fix building X11 tests on PE targets
Link libxkbcommon_x11_internal with libxkbcommon_test_internal, rather
than libxkbcommon.
This avoids some tests linking with both libxkbcommon_test_internal and
libxkbcommon, which causes duplicate symbol problems on PE targets (e.g.
Cygwin) (as all the symbols from libxkbcommon are pulled in at link
time, which clash with libxkbcommon_test_internal)
|
|
188a1c79
|
2020-03-20T18:29:03
|
|
test: add "how to type" demo program
The program takes a unicode codepoint and an RMLVO and prints out all
key + modifier combinations that would result in that codepoint.
The program was written to exercise the new
xkb_keymap_key_get_mods_for_level() function. It's handy and can be
extended in several ways, but enough for now.
Example:
$ ./build/how-to-type -l us,il,ru 0x41 | column -ts $'\t'
keysym: A (0x41)
KEYCODE KEY NAME LAYOUT# LAYOUT NAME LEVEL# MODIFIERS
38 AC01 1 English (US) 2 [ Shift ]
38 AC01 1 English (US) 2 [ Lock ]
38 AC01 2 Hebrew 2 [ Shift ]
38 AC01 2 Hebrew 2 [ Lock ]
$ ./build/how-to-type -l de -v neo 0x3b6 | column -ts $'\t'
keysym: Greek_zeta (0x7e6)
KEYCODE KEY NAME LAYOUT# LAYOUT NAME LEVEL# MODIFIERS
56 AB05 1 German (Neo 2) 4 [ Shift Mod5 ]
56 AB05 1 German (Neo 2) 4 [ Shift Mod2 Mod3 Mod5 ]
56 AB05 1 German (Neo 2) 4 [ Shift Lock Mod5 ]
56 AB05 1 German (Neo 2) 4 [ Lock Mod2 Mod3 Mod5 ]
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
1b23a650
|
2020-02-18T14:12:20
|
|
build: fix build with byacc
We apparently broke byacc support in the switch to meson.
byacc only supports short option names. And to make things fun, bison
only supports long option for `--defines`.
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/133
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
e3c3420a
|
2020-01-18T23:08:28
|
|
Bump version to 0.10.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
f09ae987
|
2019-08-05T13:51:09
|
|
build: Skip building some tests on MSVC for now
This is a stopgap measure to quickly get tests building with MSVC for
now, at some point the tests could be rewritten to avoid using getopt()
and mkdtemp() or to ship an implementation.
|
|
578aeac6
|
2019-08-05T13:37:23
|
|
build: add some defines for MSVC to allow it to be unixy
[ran: combined some commits]
|
|
d59ff39d
|
2019-08-13T01:17:51
|
|
meson.build: Take win_bison as a possible variant for Bison
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
40aab05e
|
2019-12-27T13:03:20
|
|
build: include config.h manually
Previously we included it with an `-include` compiler directive. But
that's not portable. And it's better to be explicit anyway.
Every .c file should have `include "config.h"` first thing.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|