Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| b09aa7c6 | 2025-09-21 19:05:27 | xkbcomp: Drop the key name LUT after compilation Since it is not usual to lookup for keys by their names, we can drop it to save allocations (about 2KiB on usual keymaps). We use an union of the LUT with the aliases array and try to reuse the memory allocated by the LUT. We only do so if the space is trivially available: either before the first alias entry or after the last entry, which is possible in practice, so that we get the best performance. Else we allocate a new array. | ||
| 4421a358 | 2025-09-22 10:49:18 | xkbcomp: Use keycode name LUT for xkb_symbols Replace linear search with O(1). On my setup I get 1.05x speedup compared to previous commit and 1.09x speedup compared to 44fad8a067d221ec0365455bc00c4c3c94bca0ad (no keycode name LUT). | ||
| 6c5ea6fc | 2025-06-09 16:15:20 | test: Use explicit keymap format in test_compile_string() | ||
| 79e95509 | 2025-06-09 11:07:36 | test: Use explicit keymap format in test_compile_rules() | ||
| 44c8deb2 | 2025-05-07 10:20:25 | Introduce keymap format v2 and make it the default for parsing - Added `XKB_KEYMAP_FORMAT_TEXT_V2`. - Made `xkb_keymap_new_from_names()` use the new keymap format. - Made the tools default to the new keymap format for input. This is in preparation for changes in the parsing & state handling. For now it changes nothing. | ||
| 08149dae | 2025-05-06 16:23:04 | Add internal API to query and parse supported keymap formats | ||
| 00585c5c | 2025-04-15 18:41:03 | doc: Keymap format + misc | ||
| e1892266 | 2025-02-13 16:57:46 | clang-tidy: Miscellaneous fixes | ||
| e120807b | 2025-01-29 15:35:22 | Update license notices to SDPX short identifiers + update LICENSE Fix #628. Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| c85c9bdc | 2025-01-27 17:15:06 | symbols: Allow levels with different keysyms and actions counts Contrary to groups, there is no reason for levels to restrict the same count of keysyms and actions. | ||
| c7fdf506 | 2025-01-16 20:23:28 | Use portable integer literal suffixes | ||
| e3e44998 | 2025-01-16 20: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. | ||
| 086a286a | 2024-09-23 16:20:17 | mods: Always use constants from xkbcommon-names.h Respect the claim that real modifiers names are built-in: - Add `XKB_MOD_NAME_MOD[1-5]` constants. - Replace modifiers names with their corresponding constants. | ||
| 71d64df3 | 2024-10-08 18:45:18 | symbols: Add tests for multiple actions per level | ||
| 7c4c718b | 2024-09-30 06: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. | ||
| e325e65e | 2024-02-20 08:13:37 | Add test_unit to all tests Currently it only ensure we do not buffer `stdout`. | ||
| 31ebe003 | 2023-12-19 09:15:14 | test: add a test for multiple keysyms (and some minimal docs) I couldn't find any reference to *how* the keymap format actually needs to look like if you want multiple keysyms per level. So let's add a test for it and a minimal documentation entry. | ||
| a4c08526 | 2023-07-04 09:23:24 | Improved tests related to keysyms - Add a keymap test with decimal and hexadecimal keysyms. - Reorganize code in `test/keysym.c` by parsing type: name, Unicode and hexadecimal. - Add more tests for edge cases. In particular: - test decimal format (currently not supported); - test the Unicode and hexadecimal ranges more thoroughly; - test with wrong case without the XKB_KEYSYM_CASE_INSENSITIVE flag; - test surrounding spaces. - Document the tests. | ||
| afdc9cee | 2020-10-19 10:49:37 | xkbcomp: where a keysym cannot be resolved, set it to NoSymbol Where resolve_keysym fails we warn but use the otherwise uninitialized variable as our keysym. That later ends up in the keymap as random garbage hex value. Simplest test case, set this in the 'us' keymap: key <TLDE> { [ xyz ] }; And without this patch we get random garbage: ./build/xkbcli-compile-keymap --layout us | grep TLDE: key <TLDE> { [ 0x018a5cf0 ] }; With this patch, we now get NoSymbol: ./build/xkbcli-compile-keymap --layout us | grep TLDE: key <TLDE> { [ NoSymbol ] }; | ||
| 860cfc03 | 2020-04-05 00:07:57 | keymap: don't forget about fallback mappings in xkb_keymap_key_get_mods_for_level() If the active set of modifiers doesn't match any explicit entry of the key type, the resulting level is 0 (i.e. Level 1). Some key types don't explicitly map Level 1, taking advantage of this fallback. Previously, xkb_keymap_key_get_mods_for_level didn't consider this, and only reported masks for explicit mappings. But this causes some glaring omissions, like matching "a" in the "us" keymap returning not results. Since every mask which isn't explicitly mapped falls back to 0, we can't return the all. Almost always the best choice for this is the empty mask, so return that, when applicable. Fixes https://github.com/xkbcommon/libxkbcommon/issues/140. Reported-by: https://github.com/AliKet Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| d92a248c | 2020-02-05 17:42:06 | API to query modifier set required to type a keysym The new API is useful to implement features like auto-type and desktop automation. Since the inputs for these features is usually specified in terms of the symbols that need to be typed, the implementation needs to be able to invert the keycode->keysym transformation and produce a sequence of keycodes that can be used to type the requested character(s). | ||
| 40aab05e | 2019-12-27 13: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> | ||
| 0ce17ef3 | 2016-01-20 11:40:43 | keymap: add xkb_keymap_key_by_name(), xkb_keymap_key_get_name(), tests xkb_keymap_key_by_name() allows finding a keycode from a given keyname and is useful for generating keyboard events to use in regression tests during CI xkb_keymap_key_get_name() is the inverse of xkb_keymap_key_by_name() Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com> [ran: some stylistic tweaks + another test case] Signed-off-by: Ran Benita <ran234@gmail.com> |