|
3d79f459
|
2025-03-29T11:46:34
|
|
xkbcomp: Add Unicode code point escape sequence \u{NNNN}
Unicode code point escape sequences `\u{NNNN}` are replaced with the
UTF-8 encoding of their corresponding code point `U+NNNN`, if legal.
Supported Unicode code points are in the range `1‥0x10ffff`.
Note that we will reject the `U+0000` NULL code point, as we reject it
in the octal escape sequence `\0`.
This is intended mainly for the upcoming feature to write keysyms as
UTF-8 encoded strings. It can be used for various reasons:
- avoid encoding issues;
- avoid issue with font rendering (e.g. Asian scripts);
- make white space or zero-width characters more readable.
|
|
9b255d1e
|
2025-04-03T07:52:15
|
|
tools: Update bash completion
Handle positional argument as a path for the `compile-*` tools.
|
|
955eef14
|
2025-03-28T06:30:05
|
|
tools: Ensure to honor user locale
This is just good practice, but it is also necessary if we want to
facilitate the discovery of issues with locales in libxkbcommon.
|
|
275ffa66
|
2025-03-13T21:28:35
|
|
tools: Make --kccgst xkbcli-compile-keymap option public
The new public option `--kccgst` enables to display the result of RMLVO
resolution to KcCGST components.
This option has the same function than `setxkbmap -print`. This is particularly
useful for debugging issues with the rules.
Before this commit it was a private API. This commit enables us to remove
the *internal* version of `xkbcli-compile-keymap`.
|
|
8e92f25e
|
2025-03-13T21:26:59
|
|
rules: Added xkb_components_names_from_rules()
This is mainly for debugging purposes and to enable displaying KcCGST
values from RMLVO resolution in `xkbcli compile-keymap --kccgst`.
|
|
f3a4eeaa
|
2025-03-26T16:04:39
|
|
symbols: Improve keysym parsing
|
|
70d11abd
|
2025-03-26T07:38:05
|
|
messages: Add file encoding and invalid syntax entries
Added:
- `XKB_ERROR_INVALID_FILE_ENCODING`
- `XKB_ERROR_INVALID_RULES_SYNTAX`
- `XKB_ERROR_INVALID_COMPOSE_SYNTAX`
Changed:
- `XKB_ERROR_INVALID_SYNTAX` renamed to `XKB_ERROR_INVALID_XKB_SYNTAX`.
|
|
c9b0c527
|
2025-02-13T20:26:04
|
|
interactive-wayland: Fix int casts
|
|
5cfd36ab
|
2025-02-14T10:35:49
|
|
tools: Do not load names from the environment by default
Our tools are debugging tools and as such we need to have complete
control to be able to reproduce setups. This is not currently the case,
as we do not use `XKB_CONTEXT_NO_ENVIRONMENT_NAMES` by default nor can
we set it.
So it is very easy to forget about the various `XKB_DEFAULT_*`
environement variables for the default RMLVO values, then to get puzzled
by unexpected results.
Added to that, these environment variables do not work correctly in
`xkbcli-compile-xeymap`: calling the tool without RMLVO values will
use these variables only if the RMLVO values are set explicitly empty or
if the various *constants* `DEFAULT_XKB_*` are empty. This is unexpected,
as the environment variables should *always* be used unless:
- `XKB_CONTEXT_NO_ENVIRONMENT_NAMES` is used (not the case here);
- the variable is empty; in this case the constants `DEFAULT_XKB_*` are
used.
Fixed by the following *breaking change*: make the tools use
`XKB_CONTEXT_NO_ENVIRONMENT_NAMES` *by default*, unless the new
`--enable-environment-names` option is used.
We also make `rmlvo` incompatible with `--enable-environment-names` for
now in the public tool, as else it requires a private API.
|
|
2c10e50c
|
2025-02-07T12:15:39
|
|
tools: Fix compile-keymap default KcCGST values
Values may be read from the environment.
|
|
a4038a47
|
2025-02-12T09:50:36
|
|
Miscellaneous int types fixes
|
|
7e918f2e
|
2025-02-05T15:49:26
|
|
tools: add Windows compat for S_ISFIFO
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
cfe53fe4
|
2025-02-05T15:37:49
|
|
tools: add Windows include for execv
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
df2322d7
|
2025-02-05T14:41:21
|
|
Replace include guards by `#pragma once`
We currently have a mix of include headers, pragma once and some
missing.
pragma once is not standard but is widely supported, and we already use
it with no issues, so I'd say it's not a problem.
Let's convert all headers to pragma once to avoid the annoying include
guards.
The public headers are *not* converted.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
e120807b
|
2025-01-29T15:35:22
|
|
Update license notices to SDPX short identifiers + update LICENSE
Fix #628.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
848ecacf
|
2025-01-30T09:12:54
|
|
tools: Enable Compose file positional argument and piping
Also deprecate the `--file` flag as redundant.
|
|
bcb16d29
|
2025-01-28T13:19:06
|
|
tools: Miscellaneous enhancements
|
|
b168623c
|
2025-01-28T13:24:14
|
|
tools: Enable using keymap file as a positional argument
|
|
313001ce
|
2025-01-28T13:48:02
|
|
tools: Add --keymap alias and enable loading keymap files
Add `--keymap` as a more intuitive alias to `--from-xkb`; it also makes
it consistent with `interactive-evdev`. It optionally accepts a keymap
file path; if the argument is empty or `-` then the keymap is read from
`stdin`.
|
|
ae473f9f
|
2025-01-28T09:25:33
|
|
tools: Fix return code of compile-keymap
Previously when using `--keymap` we mistakenly returned a boolean so
that `true` (resp. false) translated to `EXIT_FAILURE` (resp.
`EXIT_SUCCESS`).
Fixed by returning the proper return code integer.
|
|
a5bdb954
|
2025-01-24T20:08:01
|
|
tools: Fix signed literal used as a mask
|
|
357ab0cb
|
2025-01-23T16:42:30
|
|
clang-tidy: Fix missing default case in switch statement
|
|
5389a31e
|
2025-01-22T17:33:03
|
|
clang-tidy: Use memcpy instead of the insecure strcpy
|
|
c7fdf506
|
2025-01-16T20:23:28
|
|
Use portable integer literal suffixes
|
|
e3e44998
|
2025-01-16T20:23:47
|
|
Fix missing or incorrect integer literal suffixes
The correct suffix is required in order to have the expected value
in a portable way.
|
|
420123fd
|
2024-11-29T07:34:07
|
|
export-keysyms: Enable all keysyms export + char names
This enable to check case mappings for Unicode keysyms.
|
|
628242b2
|
2024-11-14T18:09:03
|
|
tools: Add --test to compile-{keymap,compose}
The new flag `--test` enables to only test if compilation succeeds,
without printing the corresponding keymap or Compose file.
This is useful for quick feedback and to speedup some tests suites, e.g.
for `xkeyboard-config`.
|
|
b8888345
|
2024-09-20T09:17:23
|
|
tools: Add xkbcli dump-keymap-{wayland,x11}
There is currently no easy way to dump a keymap from a Wayland compositor,
such as `xkbcomp -xkb $DISPLAY -` could do for X servers.
As `xkbcomp` may not be intuitive, a corresponding tool for X servers
would also be useful.
Add the tools `xkbcli-dump-keymap-{wayland,x11}` by tweaking the existing
`xkbcli-interactive-{wayland,x11}` tools.
|
|
60228356
|
2024-10-07T10:42:27
|
|
symbols: Add message ID for incompatible keysyms and actions counts
|
|
7c4c718b
|
2024-09-30T06:13:38
|
|
Allow only the first group in symbols sections when using RMLVO
Currently `xkb_keymap_num_layouts` may return a greater number than the
number of layouts configured using RMLVO, because we allow symbols
sections to define various groups per key.
This is unintuitive and kind of buggy: groups should be added via rules
by setting an explicit `:n` modifier.
Fix: when parsing a keymap using RMLVO resolution:
- Get the expected layouts count from the resulting KcCGST.
- Drop the groups after the first one in included symbols sections. This
will ensure that a symbol section can only define one group per key.
Notes:
- Compiling a keymap string directly is unaffected.
- RMLVO resolution may still produce more groups than the input layouts.
Indeed, some legacy rules in xkeyboard-config rely on this to insert
automatically a US layout before the given non-Latin one, resulting
in two layouts while only one was given.
|
|
a898bc81
|
2024-09-25T06:47:23
|
|
logging: Added new error messages ID for keymap and rules
|
|
0cd1087a
|
2024-09-12T01:43:56
|
|
xkbcli how-to-type: Enhance arguments parsing & doc
Currently the positional parameter of the CLI is either a Unicode code
point or a keysym. However their respective format is not documented.
It turns out that there are multiple issues due to the use of `strtol`:
- Code points can be parsed as octal, decimal and hexadecimal, while
keysyms can only be parsed as hexadecimal. Some programs outputs
keysyms in their decimal form (e.g. `wev`) so it is worth to bring
symmetry with code points.
- Octal format is unusual for both and is triggered by leading zeros,
which is unintuitive in this context.
- `U+NNNN` format is the standard format for Unicode code points but is
not supported.
- Plain characters are not supported, e.g.: a, é, ß, Æ, γ, 🦆, etc.
Although this is probably the easiest format for most users.
Fixed the issues above:
- Allow the code point to be passed exactly in the following formats:
- Literal character (requires UTF-8 character encoding of the terminal);
- Decimal number;
- Hexadecimal number: either `0xNNNN` or `U+NNNN` (any digit count)
- Allow the keysym to be passed exactly in the following formats:
- Decimal number;
- Hexadecimal number: `0xNNNN` (any digit count);
- Name.
- Improve both `--help` message and manual page.
|
|
44df6eee
|
2024-09-23T07:27:48
|
|
Add new warnings for deprecated keysyms
Add 2 new warnings:
- Deprecated keysym name (typo, historical alias, etc.);
- Deprecated keysym (all names and forms).
Guard deprecated keysym tests with verbosity level ≥2, so they are
run only when actually needed.
|
|
652b03cc
|
2024-09-01T08:32:21
|
|
compose: Add Compose table dump internal API
- Move `print_compose_table_entry` to own file and add a `file`
argument to select output.
- Add `xkb_compose_table_dump` to dump a Compose table.
This change is needed in order to share the feature “dump a Compose
table” between tests and tools.
|
|
d85fc24d
|
2024-07-16T10:22:23
|
|
test: initialize two return values
../../../test/xvfb-wrapper.c:166:5: warning: Undefined or garbage value
returned to caller [core.uninitialized.UndefReturn]
166 | return rc;
../../../tools/interactive-wayland.c:820:14: warning: The left operand
of '>=' is a garbage value [core.UndefinedBinaryOperatorResult]
820 | exit(ret >= 0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
|
a0a59d9f
|
2024-07-16T10:37:09
|
|
interactive-x11: initialize a variable
If xkb_compose_table_new_from_locale() fails we end up de-initializing
the keyboard state before it was ever initialized.
../../../tools/interactive-x11.c:196:5: warning: 1st function call
argument is an uninitialized value [core.CallAndMessage]
196 | xkb_state_unref(kbd->state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
798b7b73
|
2024-02-23T17:10:15
|
|
keysyms: Export explicitly named keysyms
Added a tool to export explicitly named keysyms to a yaml file. This
includes the following keysyms properties:
- Value
- Name
- Corresponding Unicode code point, if relevant
- Corresponding case mapping, if relevant
This will allow us to check the case mappings easier and to refactor the
related functions.
|
|
addf73c5
|
2024-07-12T09:17:34
|
|
keysyms: Require only 5 bytes for UTF-8 encoding
Require only 5 bytes for the buffer of `xkb_keysym_to_utf8`, as UTF-8
encodes code points on up to 4 bytes + 1 byte for the NULL-terminating
byte.
Previous standard [RFC 2279] (1998) required up to 6 bytes per code
point, but has been superseded by [RFC 3629] (2003).
[RFC 2279]: https://datatracker.ietf.org/doc/html/rfc2279
[RFC 3629]: https://datatracker.ietf.org/doc/html/rfc3629
|
|
a4f62fcd
|
2024-06-04T07:03:10
|
|
doc (manuals): clean and expand apropos results
Previously on FreeBSD/mandoc (probably affecting others), everything
except xkbcli was being listed twice and wrapping on standard console
in apropos because mdoc(7) names should not have spaces or be different
than the title.
Further, xkb is already parsed in search results by being in the name,
so expand xkb to "X keyboard" so that they match for apropos keyboard.
We did this already in xkbutils, which matches setxkbmap.
These don't need to be quoted literals, and - doesn't need to be escaped,
but I left them because there may be environments which are not to spec,
but I'm happy to ammend this commit if that cleanup seems desirable.
Co-authored-by: Ran Benita <ran@unusedvar.com>
|
|
abb6e588
|
2023-12-30T13:18:18
|
|
tools: remove unused `#incldue <ctype.h>`
We avoid this header due to its locale dependence. This include seems
like a leftover in 44029221e8423f1ca93470952542a0517a208d42.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
13b36a76
|
2024-03-01T15:02:41
|
|
Global default statement: Improve code & error message
- Simplify error handling.
- Improve error message: add message ID and relevant
quotes and try to standardize a bit.
- Add proper doc for in the message registry.
Note: Instead of testing the value of `expr.op`, we test if the argument
`elem` of `ExprResolveLhs` is set: this allows us to catch also the
error with `x.y[z]` rather than just `x.y` as previously.
|
|
883bac60
|
2024-02-14T11:26:10
|
|
tools: constify the prefix in tools_print_keycode_state
|
|
89ceb351
|
2024-02-14T10:23:15
|
|
tools: add --verbose to interactive-evdev
|
|
dd3e2140
|
2024-02-08T20:15:22
|
|
interactive-evdev: reduce the space allocated for keysyms (#443)
* interactive-evdev: reduce the printed space used for keysyms
In commit 8cca3a7bfb185876994d6ec3d25cda88e5640a4d the buffer for the keysym
was extended to accommodate for up to XKB_COMPOSE_MAX_STRING_SIZE bytes. This
caused the printf to expand to the same width for the keysym alone, making the
output less useful. Drop this back down to the same width it was before.
|
|
8e26a8b2
|
2024-02-07T10:06:15
|
|
interactive-evdev: align Usage and or in the help output
|
|
8cca3a7b
|
2023-12-05T17:39:59
|
|
compose: Add XKB_COMPOSE_MAX_STRING_SIZE
Define the maximum size of a compose sequence result string explicit as
a constant and use it everywhere to improve the code readability.
|
|
c1b5da1d
|
2024-01-12T10:40:26
|
|
tools: Fix bash completion permissions
There is no need to give execution permission. It also creates an
unnecessary work for packaging.
Fixed by removing execution permission.
|
|
0074baf4
|
2023-12-19T07:28:52
|
|
keysyms: Add XKB_KEYSYM_NAME_MAX_SIZE for internal use
Currently there is no indication of the maximum length of keysym names.
This is statically known, so add the new *internal* following API:
`XKB_KEYSYM_NAME_MAX_SIZE`.
|
|
cfcc7922
|
2023-11-07T12:58:46
|
|
xkbcli-compose: Simplify locale options
Current options to set the locale are convoluted:
- An explicit locale *must* be given, while a sane default would be
to use the user environment.
- Then there are two options that were useful while testing locale
handling: read environment variables or use `setlocale`. But the
program has already called:
```
setlocale(LC_ALL, "");
```
so it turns out the two options lead to the same results.
Remove options `--locale-from-env` and `--locale-from-setlocale`
and make the locale default to the user environment.
|
|
0a577a09
|
2023-11-07T12:58:41
|
|
xkbcli-compile-compose: Fix string result escaping
Currently the result string is not escaped and may produce invalid
results.
Fixed by introducing an ad-hoc escape function and relative tests.
|
|
d826d70b
|
2023-11-07T12:58:36
|
|
xkbcli: Fix bash completion
`compgen` expect command options list formatted as a newline-separated
list. Add a missing newline when concatenating two lists.
|
|
bc330c00
|
2023-11-07T12:58:20
|
|
xkbcli: Promote compose to xkbcli-compile-compose
Previously this tool was only used for internal testing and thus
not installed. But it is useful for debugging, much like
xkbcli-compile-keymap.
|
|
00e3058e
|
2023-11-06T21:53:51
|
|
Prevent recursive includes of keymap components
- Add check for recursive includes of keymap components. It relies on
limiting the include depth. The threshold is currently to 15, which
seems reasonable with plenty of margin for keymaps in the wild.
- Add corresponding new log message `recursive-include`.
- Add tests for recursive includes.
|
|
4b58ff78
|
2023-10-25T20:59:36
|
|
Fix memory leak in print_keymap
The string buffer was not freed.
|
|
171e0170
|
2023-10-25T20:39:39
|
|
Fix memory leak in FindFileInXkbPath
The string `buf` was not freed after each call to `asprintf_safe`.
Avoid allocating and introduce the new message: `XKB_ERROR_INSUFFICIENT_BUFFER_SIZE`.
|
|
0f9c95df
|
2023-11-01T18:12:15
|
|
interactive-x11: Add support for Compose
|
|
c7f4e308
|
2023-11-01T13:06:38
|
|
interactive-wayland: Add support for Compose
|
|
1c1542d6
|
2023-09-29T20:44:06
|
|
Tools: Add bash completions for xkbcli
- Add bash completion script. It parses the commands help messages to
provide the completions, thus any new subcommand or option will be
supported, as long as it has its entry in the help messages. This
should result in low maintenancei effort.
- Add installation entry in Meson. The path can be configured using
the following options:
- `enable-bash-completion` to enable the installation;
- `bash-completion-path` to control the installation path. It will
default to: `share/bash-completion/completions`.
TODO: completion for other shells, such as zsh?
|
|
357c00b3
|
2023-10-03T10:28:47
|
|
Tools: Improve xkbcli help messages and manual pages
Add missing `--help` and `--short` entries.
|
|
ca7aa69c
|
2023-09-26T17:05:05
|
|
Disallow producing NULL character with escape sequences
NULL usually terminates the strings; allowing to produce it via escape
sequences may lead to undefined behaviour.
- Make NULL escape sequences (e.g. `\0` and `\x0`) invalid.
- Add corresponding test.
- Introduce the new message: XKB_WARNING_INVALID_ESCAPE_SEQUENCE.
|
|
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>
|
|
a83d745b
|
2023-09-21T20:06:27
|
|
Messages: add new messages to registry
This commit is another step to identify and document the maximum number
of logging messages. Bulk changes:
- Rename `conflicting-key-type` to `conflicting-key-type-merging-groups`.
Giving more context in the name allow us to introduce
`conflicting-key-type-definitions` later.
- Add conflicting-key-type-definitions
- Add conflicting-key-type-map-entry
- Add undeclared-modifiers-in-key-type
Also improve the log messages.
- Add conflicting-key-type-preserve-entries
- Use XKB_ERROR_UNSUPPORTED_MODIFIER_MASK
- Add illegal-key-type-preserve-result
- Add conflicting-key-type-level-names
- Add duplicate-entry
- Add unsupported-symbols-field
- Add missing-symbols-group-name-index
- Use XKB_ERROR_WRONG_FIELD_TYPE
- Add conflicting-key-name
- Use XKB_WARNING_UNDEFINED_KEYCODE
- Add illegal-keycode-alias
- Add unsupported-geometry-section
- Add missing-default-section
- Add XKB_LOG_MESSAGE_NO_ID
- Rename log_vrb_with_code to log_vrb
- Use ERROR_WRONG_FIELD_TYPE & ERROR_INVALID_SYNTAX
- Add unknown-identifier
- Add invalid-expression-type
- Add invalid-operation + fixes
- Add unknown-operator
- Rename ERROR_UNKNOWN_IDENTIFIER to ERROR_INVALID_IDENTIFIER
- Add undeclared-virtual-modifier
- Add expected-array-entry
- Add invalid-include-statement
- Add included-file-not-found
- Add allocation-error
- Add invalid-included-file
- Process symbols.c
- Add invalid-value
- Add invalid-real-modifier
- Add unknown-field
- Add wrong-scope
- Add invalid-modmap-entry
- Add wrong-statement-type
- Add conflicting-key-symbols-entry
- Add invalid-set-default-statement
|
|
eafd3ace
|
2023-09-18T18:17:39
|
|
Add a new warning for numeric keysyms
Usually it is better to use the corresponding human-friendly keysym
names. If there is none, then the keysym is most probably not
supported in the ecosystem. The only use case I see is similar to the
PUA in Unicode (see: https://en.wikipedia.org/wiki/Private_Use_Areas).
I am not aware of examples of this kind of use.
|
|
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.
|
|
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`.
|
|
b5079dc9
|
2023-09-18T12:15:06
|
|
Interactive tools: add options to hide some fields
Display can be cluttered when too many fields are displayed.
Add options to hide some default fields
|
|
c23c6bb9
|
2023-09-18T12:06:45
|
|
Interactive tools: always print keycode
|
|
44029221
|
2023-09-18T11:59:30
|
|
Interactive tools: Escape control character for Unicode output
Currently the interactive tools print the string result of key strokes
as it is, without any escape. This is especially annoying for trivial
keysyms such as: Return, BackSpace and Escape.
Fix this by displaying the Unicode code point notation (e.g U+000D for
Return) for single control characters from the C0 set and DEL.
This is a hack: ideally we would like to escape any non-printable
character in the utf-8 string.
|
|
0d01a933
|
2023-07-04T09:34:08
|
|
Replace keycode numeric offset with EVDEV_OFFSET
Add a constant `EVDEV_OFFSET` to make the semantic of the offset clearer.
|
|
f75c0a2d
|
2023-07-01T19:39:31
|
|
xkbcli: allow compile-keymap without args
All of the arguments have defaults, but still an argument is required.
Make it work.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
de9d8207
|
2023-06-16T09:54:09
|
|
interactive-evdev: includes options
Currently there is no interactive tool allowing to set the include
paths of the context, such as in "compile-keymap". Note that only
"interactive-evdev" makes sense, because it does not rely on a
compositor.
Add --include and --include-defaults to "interactive-evdev" tool.
The code is adapted from "compile-keymap".
|
|
bd79a960
|
2023-04-11T23:24:47
|
|
Possible fix for non-MSVC windows compilers
`_MSC_VER` is specific to MSVC, but there can be other compilers targeting
windows. Hopefully they do define `_WIN32`, so let's use that.
Refs: https://github.com/xkbcommon/libxkbcommon/issues/305
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
320f56d2
|
2022-09-04T00:51:07
|
|
interactive-wayland: Fix interface versioning
We need to request the lower version of the interface versions we
support and the server supports, not the higher version.
Using the higher version caused crashes due to unbound callbacks on
GNOME, which supports a higher version of `xdg_wm_base`.
|
|
50a24569
|
2021-11-10T14:45:53
|
|
tools/list: print an empty string for null vendor strings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
abb115c7
|
2021-11-08T14:33:29
|
|
tools/list: enclose the the various field names in quotes
Because otherwise the 'no' layout is treated as disagreement with whatever is to
be disagreed with. Fixed in YAML 1.2 but that's not universally supported.
Fixes #268
|
|
e8cb4311
|
2021-11-01T23:56:22
|
|
man: mention `xkbcli list` output is meant to be in YAML 1.2 format
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
f8c430cf
|
2021-07-31T22:03:33
|
|
tools/how-to-type: add --keysym for how to type a keysym
Previously, could only check how to type a Unicode codepoint, but
searching for a keysym directly is also occasionally useful.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
5419e577
|
2021-07-12T11:05:50
|
|
tools/interactive-x11: use keysym to look for Esc
Don't assume that keycode 9 means Escape. Instead, use the keymap
to check for Esc.
Logic copied from the Wayland version.
Signed-off-by: Simon Ser <contact@emersion.fr>
|
|
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>
|
|
f434c690
|
2021-04-22T12:52:55
|
|
tools: change xkbcli list to output YAML
We have a lot of keyboard layouts and the current output format is virtually
useless at searching for a specific one to debug any issues with either the
layout list or the output from libxkbregistry.
Let's use YAML instead because that can easily be post-processed to extract the
specific layouts wanted, e.g. to get the list of all layouts:
xkbcli-list | yq -r ".layouts[].layout"
to get the list of all variants of the "us" layout:
xkbcli-list | yq -r '.layouts[] | select(.layout == "us") | .variant
and the number of option groups:
xkbcli-list | yq -r '.option_groups[] | length'
Note that the top-level nodes have been de-capitalized, so where it was "Models"
before it is now "models" and the "Options" node is now "option_groups".
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
693ffb07
|
2021-04-22T12:42:00
|
|
tools: change the list separator handling
Slightly easier to read than the "bool first" approach.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
f04c7e93
|
2021-04-14T12:56:07
|
|
interactive-wayland: fallback to ftruncate() if needed
Fallback to ftruncate() if the underlying filesystem does not
support posix_fallocate().
Idea by: Jan Beich <jbeich@FreeBSD.org>, Niclas Zeising <zeising@FreeBSD.org>
Inspired by: Wayland cursor/os-compatibility.c
[ran: small adjustments]
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
cda2eaf1
|
2021-03-29T20:59:12
|
|
man: add missing pointer to xkbcli-compile-keymap(1)
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
c14910a0
|
2021-03-28T16:10:52
|
|
interactive-evdev: fix missing initialization
Accidentally got lost in 6b65be4.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
6b65be4c
|
2021-03-28T12:55:08
|
|
interactive-evdev: switch from epoll(2) to poll(2)
Turns out FreeBSD supports evdev, so this toll can work on it; however
it does not support epoll, so switch to poll, which is portable.
Reported-by: Evgeniy Khramtsov <evgeniy@khramtsov.org>
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
c5565bd0
|
2020-09-09T10:09:13
|
|
tools: align `xkbcli how-to-type` output ourselves
Can possibly add a machine-parsable format if desired, but for now just
have it work nicely.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
0f8ae6ec
|
2020-09-05T23:41:08
|
|
xkbcli: fix interactive-x11 not showing in help
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>
|
|
d5c6b581
|
2020-07-27T11:24:06
|
|
tools: convert man pages from man format to mdoc format
The mdoc is more semantic and consistent.
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>
|
|
fcc6b28f
|
2020-07-27T11:57:24
|
|
tools/interactive-evdev: fixup 64bff65
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
64bff65a
|
2020-07-27T11:51:53
|
|
tools/interactive-evdev: change --evdev-offset to --without-x11-offset
There is no reason to give full control rather than just enable/disable.
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>
|
|
95111740
|
2020-07-25T16:36:54
|
|
tools/compile-keymap: hide --kccgst comment on public build
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
2fefe558
|
2020-07-25T16:34:11
|
|
tools: fix strcmp mistake in 0066e38
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>
|
|
f439ce18
|
2020-07-25T11:17:11
|
|
tools: some minor changes to xkbcli
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
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>
|
|
a472e030
|
2020-07-24T13:25:11
|
|
tools: avoid use of a private api
This is merely to fill in some NULL pointers anyway, we can just use
the #defines we have available at build time.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|