libxkbcommon 1.10.0
Library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state
|
Changed Compose behavior so that sequences defined later always override ones defined earlier, even if the new sequence is shorter.
Contributed by Jules Bertholet
xkb_state_update_mask()
should migrate to using xkb_state_update_latched_locked()
instead, for proper handling of the keyboard state. (#310)The following modifiers names in xkbcommon/xkbcommon-names.h
are now deprecated and will be removed in a future version:
XKB_MOD_NAME_ALT
: use XKB_VMOD_NAME_ALT
instead.XKB_MOD_NAME_LOGO
: use XKB_VMOD_NAME_SUPER
instead.XKB_MOD_NAME_NUM
: use XKB_VMOD_NAME_NUM
instead.(#538)
Added xkb_state_update_latched_locked()
to update the keyboard state to change the latched and locked state of the modifiers and layout.
This entry point is intended for server applications and should not be used by client applications. This can be use for e.g. a GUI layout switcher. (#310)
xkb_keymap_mod_get_mask()
to query the mapping of a modifier.Added VoidAction()
action to match the keysym pair NoSymbol
/VoidSymbol
. It enables erasing a previous action and breaks latches.
This is a libxkbcommon extension. When serializing it will be converted to LockControls(controls=none,affect=neither)
for backward compatibility. (#622)
xkbcli-compile-keymap
: Added option --modmaps
that prints modifiers mappings. This is similar to the legacy xmodmap -pm
.xkbcomp
. This particularly affects Japanese layout jp
when used with Xwayland. (#750)xkbcomp
.Trailing NoSymbol
and NoAction()
are now dropped. This may affect keys that rely on an implicit key type.
Example:
c key <> { type= "ALPHABETIC", [a, A] };
Added function xkb_components_names_from_rules()
to compute
KcCGST
keymap components from
RMLVO names resolution.
This mainly for debugging purposes and to enable the --kccgst
option in the tools. (#669)
*
legacy wild card:<none>
: Match empty value.<some>
: Match non-empty value.<any>
: Match any (optionally empty) value. Its behavior does not depend on the context, contrary to the legacy wild card *
.xkb_types
section is now legal. The missing components will still be serialized explicitly in order to maintain backward compatibility.Added support for further empty compound statements:
xkb_types
: type "xxx" {};
xkb_compat
: interpret x {};
and indicator "xxx" {};
.Such statements are initialized using the current defaults, i.e. the factory implicit defaults or some explicit custom defaults (e.g. indicator.modifiers = Shift
).
{}
and {a}
. Example: key <A> { [{}, {a}, {a, A}] };
.^
, such as: include "a^b"
. The main motivation is to enable this new syntax in rules, which previously could not handle this merge mode.interpret
statements of the xkb_compat
component, mirroring the syntax used in xkb_symbols
. (#695)xkb_state_key_get_syms()
. (#552)xkb_utf32_to_keysym
: Allow Unicode noncharacters. (#715)UNNNN
: allow control characters C0 and C1 and use xkb_utf32_to_keysym()
for the conversion when NNNN < 0x100
, for backward compatibility.0xNNNN
: unchanged. Contrary to the Unicode format, it does not normalize any keysym values in order to enable roundtrip with xkb_keysym_get_name()
.(#715)
\u{NNNN}
. They 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
. This is intended mainly for writing keysyms as UTF-8 encoded strings.U+1F3BA
(TRUMPET) "🎺"
is converted into a single keysym: U1F3BA
."J́"
is converted to U+004A LATIN CAPITAL LETTER J plus U+0301 COMBINING ACUTE ACCENT: {J, U0301}
.""
denotes the keysym NoSymbol
.U+200E
LEFT-TO-RIGHT MARKU+200F
RIGHT-TO-LEFT MARKlibxml2-2.14+
, which now disallows parsing trailing NULL
bytes. (#692)Fixed included default section not resolving to an exact match in some cases. It may occur if one creates a file name in a user XKB directory that also exists in the XKB system directory.
Example: if one creates a custom variant my_variant
in the file $XDG_CONFIG_HOME/xkb/symbols/us
, then before libxkbcommon 1.9.0 every statement loading the default map of the us
file, include "us"
, would wrongly resolve including us(my_variant)
from the user configuration directory instead of us(basic)
from the XKB system directory. Starting from libxkbcommon 1.9.0, include "us"
would correctly resolve to the system file, unless $XDG_CONFIG_HOME/xkb/symbols/us
contains an explicit default section. (#726)
Fixed floating-point number parsing failling on locales that use a decimal separator different than the period .
.
Note that the issue is unlikely to happen even with such locales, unless parsing a keymap with a geometry component which contains floating-point numbers.
Affected API:
xkb_keymap_new_from_file()
,xkb_keymap_new_from_buffer()
,xkb_keymap_new_from_string()
.Unaffected API:
xkb_keymap_new_from_names()
: none of the components loaded use floating-point number. libxkbcommon does not load geometry files.libxkbcommon-x11
: no such parsing is involved.Fixed the handling of empty keys. Previously keys with no symbols nor actions would simply be skipped entirely. E.g. in the following:
the key <A>
would be skipped and the virtual modifier M
would not be mapped to Shift
. This is now handled properly.
whichGroupState
indicator field.xkbcli compile-keymap
: Added --kccgst
option to display the result of
RMLVO
names resolution to
KcCGST
components.
This option has the same function than setxkbmap -print
. This is particularly useful for debugging issues with the rules. (#669)
Fixed segfault due to invalid arithmetic to bring negative layout indexes into range. It triggers with the following settings:
N > 0
, andn = - k * N
(k > 0
)Note that these settings are unlikely in usual use cases.
--enable-environment-names
option.NoSymbol
is now systematically dropped in multi-keysyms levels:
ssharp
→ U1E9E
). This enable to type ẞ using CapsLock thanks to the internal capitalization rules.Updated keysyms case mappings to cover full [Unicode 16.0]. This change provides a consistent behavior with respect to case mappings, and affects the following:
xkb_keysym_to_lower()
and xkb_keysym_to_upper()
give different output for keysyms not covered previously and handle title-cased keysyms.
Example of title-cased keysym: U01F2
“Dz”:
xkb_keysym_to_lower(U01F2) == U01F3
“Dz” → “dz”xkb_keysym_to_upper(U01F2) == U01F1
“Dz” → “DZ”Note: There is a single exception that do not follow the Unicode mappings:
xkb_keysym_to_upper(ssharp) == U1E9E
“ß” → “ẞ”Note: As before, only simple case mappings (i.e. one-to-one) are supported. For example, the full upper case of U+01F0
“ǰ” is “J̌” (2 characters: U+004A
and U+030C
), which would require 2 keysyms, which is not supported by the current API.
GroupLatch
action, usually activated with the keysym ISO_Group_Latch
. (#455)Symbols: Added support for multiple actions per levels:
interpret
statements are used to find an action corresponding to each keysym, as expected.For now, at most one action of each of the following categories is allowed per level:
SetMods
, LatchMods
, LockMods
;SetGroup
, LatchGroup
, LockGroup
.Some examples:
SetMods
+ SetGroup
: okSetMods
+ SetMods
: errorSetMods
+ LockMods
: errorSetMods
+ LockGroup
: ok(#486)
Updated keysyms using latest xorgproto (commit: d7ea44d5f04cc476dee83ef439a847172f7a6bd1
):
Additions:
XKB_KEY_XF86RefreshRateToggle
XKB_KEY_XF86Accessibility
XKB_KEY_XF86DoNotDisturb
Relevant upstream merge request: xorgproto-91.
Added deprecated keysym warnings:
These warnings are activated by setting the log verbosity to at least 2.
It is advised to fix these warnings, as the deprecated items may be removed in a future release.
xkbcommon-names.h
: Added the following modifiers names definitions:XKB_MOD_NAME_MOD1
XKB_MOD_NAME_MOD2
XKB_MOD_NAME_MOD3
XKB_MOD_NAME_MOD4
XKB_MOD_NAME_MOD5
XKB_VMOD_NAME_ALT
XKB_VMOD_NAME_META
XKB_VMOD_NAME_NUM
XKB_VMOD_NAME_SUPER
XKB_VMOD_NAME_HYPER
XKB_VMOD_NAME_LEVEL3
XKB_VMOD_NAME_LEVEL5
XKB_VMOD_NAME_SCROLL
xkbcommon-names.h
: Added XKB_LED_NAME_COMPOSE
and XKB_LED_NAME_KANA
definitions to cover all LEDs defined in USB HID.
Contributed by Martin Rys
Rules: Added support for special layouts indexes:
layout[single]
is the same as without explicit index: layout
.layout
and layout[1]
.layout[2]
.. layout[MAX_LAYOUT]
, where MAX_LAYOUT
is currently 4.Also added:
i
which correspond to the index of the matched layout.:all
qualifier: it applies the qualified item to all layouts.See the documentation for further information.
Previously, setting explicit actions for a group in symbols files made the parser skip compatibility interpretations for all groups in the corresponding key, resulting in possibly broken groups with no explicit actions or missing key fields.
Fixed by skipping interpretations only for groups with explicit actions when parsing a keymap and setting relevant fields explicitly when serializing a keymap to a string. (#511)
xkb_keymap_new_from_names()
: Allow only one group per key in symbols sections. While the original issue was fixed in xkeyboard-config
project, the previous handling in libxkbcommon
of extra key groups was deemed unintuitive.
Note: rules resolution may still produce more groups than the input layouts. This is currently true for some legacy rules in xkeyboard-config
.
(#262)
xkb_keymap_get_as_string
truncating the 4 longest keysyms names, such as Greek_upsilonaccentdieresis
.xkb_keysym_to_utf8
: Require only 5 bytes for the buffer, 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). (#418)Registry: Fixed libxml2
global error handler not reset after parsing, which could trigger a crash if the corresponding rxkb_context
has been freed.
Contributed by Sebastian Keller. (#529)
Rules: Fix handling of wild card *
to match the behavior of libxkbfile
. Previously *
would match any value, even empty one. Now:
model
and options
: always match.layout
and variant
: match any non-empty value.(#497)
LatchGroup
action with the latchToLock
option disabled not applying its latch effect multiple times. (#577)whichGroupState
is set with Base
or Latched
. (#579)U1E9E
→ ssharp
). This re-enable the detection of alphabetic key types for the pair (ß, ẞ).The following functions now allow to query also virtual modifiers, so they work with any modifiers (real and virtual):
xkb_state_mod_index_is_active()
xkb_state_mod_indices_are_active()
xkb_state_mod_name_is_active()
xkb_state_mod_names_are_active()
xkb_state_mod_index_is_consumed()
xkb_state_mod_index_is_consumed2()
xkb_state_mod_mask_remove_consumed()
Warning: they may overmatch in case there are overlappings virtual-to-real modifiers mappings.
xkbcli dump-keymap-wayland
and xkbcli dump-keymap-x11
debugging tools to dump a keymap from a Wayland compositor or a X server, similar to what xkbcomp -xkb $DISPLAY -
does for X servers.xkbcli compile-compose
: the Compose file may be passed as a positional argument and --file
is now deprecated. The file can also be piped to the standard input by setting the path to -
.xkbcli compile-keymap
: Added --keymap
as a more intuitive alias for --from-xkb
. Both now accept an optional keymap file argument. These flags may be omitted; in this case the keymap file may be passed as a positional argument.--test
option to compile-keymap
and compile-compose
, to enable testing compilation without printing the resulting file.xkbcli how-to-type
: added new input formats and their corresponding documentation.
Unicode code points can be passed in the following formats:
0xNNNN
or U+NNNN
.Keysyms can to be passed in the following formats:
0xNNNN
;Greek_upsilonaccentdieresis
.xkbcli list
: Fix duplicate variants. (#587)-Wl,--version-script
more robust. (#481)Updated keysyms using latest xorgproto (commit: cd33097fc779f280925c6d6bbfbd5150f93ca5bc
):
For the sake of compatibility, this reintroduces some deleted keysyms and postpones the effective deprecation of others, that landed in xkbcommon 1.6.0.
XKB_KEY_dead_lowline
XKB_KEY_dead_aboveverticalline
XKB_KEY_dead_belowverticalline
XKB_KEY_dead_longsolidusoverlay
xkb_keymap_key_get_name
and xkb_keymap_get_as_string
.XKB_KEY_masculine
: is deprecated in favor of XKB_KEY_ordmasculine
XKB_KEY_guillemotleft
: is deprecated in favor of XKB_KEY_guillemetleft
XKB_KEY_guillemotright
: is deprecated in favor of XKB_KEY_guillemetright
XKB_KEY_dead_small_schwa
: is deprecated in favor of XKB_KEY_dead_schwa
XKB_KEY_dead_capital_schwa
: is deprecated in favor of XKB_KEY_dead_SCHWA
Relevant upstream merge requests: xorgproto-83, xorgproto-84.
xkb_keysym_from_name
when used with the flag XKB_KEYSYM_CASE_INSENSITIVE
. In some rare cases it would return a keysym with an upper-case name instead of the expected lower-case (e.g. XKB_KEY_dead_A
instead of XKB_KEY_dead_a
).XKB_KEY_ydiaeresis
XKB_KEY_mu
XKB_KEY_ssharp
xkb_keysym_is_modifier
to detect also the following keysyms:XKB_KEY_ISO_Level5_Shift
XKB_KEY_ISO_Level5_Latch
XKB_KEY_ISO_Level5_Lock
Fixed global default statements x.y = z;
in wrong scope not raising an error.
Contributed by Mikhail Gusarov
Keymap: Fixed empty symbols declaration.
Contributed by Yuichiro Hanada.
Rules: Made newline required after !include
line.
Contributed by Mikhail Gusarov.
Rules: Fixed a bug where variant indexes were ignored with the layout index used instead. They are practically always the same, but don’t have to be.
Contributed by @wysiwys.
xkb_compose_table_iterator_next
when used on an empty table.xkbcli compile-compose
: added new CLI utility to test Compose files.xkbcli interactive-evdev
: added --verbose
option.xkbcli interactive-x11
: added support for Compose.xkbcli interactive-wayland
: added support for Compose.Fix building with clang when using -Wl,--gc-sections
.
Contributed by ppw0.
Fixed linking using lld 1.17
.
Contributed by Baptiste Daroussin.
-Denable-docs=true
.Remove keysyms that were intended for German T3 layout but are unused:
XKB_KEY_dead_lowline
XKB_KEY_dead_aboveverticalline
XKB_KEY_dead_belowverticalline
XKB_KEY_dead_longsolidusoverlay
See the upstream xorgproto
MR. See hereinafter for further changes related to keysyms.
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()
XKB-NNN
, where NNN
is a decimal number.XKB_KEYSYM_MAX
to check valid keysyms.modifier_map None { … }
. This feature is missing compared to the X11 implementation. It allows to reset the modifier map of a key.1c8128d72df22843a2022576850bc5ab5e3a46ea
):XKB_KEY_ordmasculine
(xorgproto-68)XKB_KEY_guillemetleft
(xorgproto-68)XKB_KEY_guillemetright
(xorgproto-68)XKB_KEY_dead_schwa
(xorgproto-78)XKB_KEY_dead_SCHWA
(xorgproto-78)XKB_KEY_dead_hamza
(xorgproto-71)XKB_KEY_XF86EmojiPicker
(xorgproto-44)XKB_KEY_XF86Dictate
(xorgproto-49)XKB_KEY_XF86CameraAccessEnable
(xorgproto-82)XKB_KEY_XF86CameraAccessDisable
(xorgproto-82)XKB_KEY_XF86CameraAccessToggle
(xorgproto-82)XKB_KEY_XF86NextElement
(xorgproto-82)XKB_KEY_XF86PreviousElement
(xorgproto-82)XKB_KEY_XF86AutopilotEngageToggle
(xorgproto-82)XKB_KEY_XF86MarkWaypoint
(xorgproto-82)XKB_KEY_XF86Sos
(xorgproto-82)XKB_KEY_XF86NavChart
(xorgproto-82)XKB_KEY_XF86FishingChart
(xorgproto-82)XKB_KEY_XF86SingleRangeRadar
(xorgproto-82)XKB_KEY_XF86DualRangeRadar
(xorgproto-82)XKB_KEY_XF86RadarOverlay
(xorgproto-82)XKB_KEY_XF86TraditionalSonar
(xorgproto-82)XKB_KEY_XF86ClearvuSonar
(xorgproto-82)XKB_KEY_XF86SidevuSonar
(xorgproto-82)XKB_KEY_XF86NavInfo
(xorgproto-82)XKB_KEY_masculine
: use XKB_KEY_ordmasculine
instead (xorgproto-68)XKB_KEY_guillemotleft
: use XKB_KEY_guillemetleft
instead (xorgproto-68)XKB_KEY_guillemotright
: use XKB_KEY_guillemetright
instead (xorgproto-68)XKB_KEY_dead_small_schwa
: use XKB_KEY_dead_schwa
instead (xorgproto-78)XKB_KEY_dead_capital_schwa
: use XKB_KEY_dead_SCHWA
instead (xorgproto-78)xkb_keysym_from_name
to parse out-of-range hexadecimal keysyms.\0
and \x0
.\400..\777
invalid.xkb_keymap_new_from_buffer
: Allow for a NULL-terminated keymap string.Compose: Increase the limit of possible entries to handle huge Compose files.
Contributed by alois31.
xkbcli
and its subcommands.xkbcli interactive-*
: Add options --short
to hide some fields.xkbcli interactive-evdev
: Add --includes
and --include-defaults
options.xkb-check-messages
experimental tool (not installed). It checks whether given log messages identifiers are supported.xkbcli compile-keymap
: Allow to use without arguments.xkbcli interactive-*
: Always print keycode.xkbcli interactive-*
: Escape control characters for Unicode output, instead of printing them as-is, messing the output.Allow xkbcommon
to be used as a subproject.
Contributed by Simon Ser.
Add xkb_context
flag XKB_CONTEXT_NO_SECURE_GETENV
and rxkb_context
flag RXKB_CONTEXT_NO_SECURE_GETENV
.
xkbcommon uses getenv_secure()
to obtain environment variables. This flag makes xkbcommon use getenv()
instead.
This is useful for some clients that have relatively benign capabilities set, like CAP_SYS_NICE
, that also want to use e.g. the XKB configuration from the environment and user configs in $XDG_CONFIG_HOME
.
Contributed by Ronan Pigott.
Fix crash in xkbcli interactive-wayland
under a compositor which supports new versions of the xdg-shell protocol.
Contributed by Jan Alexander Steffens (heftig).
XKB_CONTEXT_NO_SECURE_GETENV
RXKB_CONTEXT_NO_SECURE_GETENV
Fix compose sequence overriding (common prefix) not working correctly. Regressed in 1.2.0.
Contributed by Weng Xuetian.
Remove various bogus currency sign (particulary Euro and Korean Won) entries from the keysym ↔ Unicode mappings. They prevented the real keysyms/codepoints for these from mapping correctly.
Contributed by Sam Lantinga and Simon Ser.
Add enable-tools
option to Meson build (on by default) to allow disabling the xkbcli
tools.
Contributed by Alex Xu (Hello71).
In xkbcli list
, fix “YAML Norway problem” in output.
Contributed by Peter Hutterer.
In libxkbregistry, variants now inherit iso639, iso3166 and brief from parent layout if omitted.
Contributed by M Hickford.
In libxkbregistry, don’t call xmlCleanupParser()
- it’s not supposed to be called by libraries.
Contributed by Peter Hutterer.
In libxkbregistry, skip over invalid ISO-639 or ISO-3166 entries.
Contributed by Peter Hutterer.
In xkbcli interactive-x11
, use the Esc keysym instead of the Esc keycode for quitting.
Contributed by Simon Ser.
xkbcli how-to-type
, add --keysym
argugment for how to type a keysym instead of a Unicode codepoint.Fix a crash in xkb_x11_keymap_new_from_device()
error handling given some invalid keymaps. Regressed in 1.2.0.
Reported by Zack Weinberg. Tested by Uli Schlachter.
Change xkbcli list
to output YAML, instead of the previous ad-hoc format.
This allows to more easily process the information in a programmetic way, for example
xkbcli list | yq -r ".layouts[].layout"
Contributed by Peter Hutterer.
Fix segmentation fault in case-insensitive xkb_keysym_from_name()
for certain values like the empty string.
Contributed by Isaac Freund.
Support building libxkbcommon as a meson subproject.
Contributed by Adrian Perez de Castro.
Add ftruncate
fallback for posix_fallocate
in xkbcli interactive-wayland
for FreeBSD.
Contributed by Evgeniy Khramtsov.
Properly export library symbols in MSVC.
Contributed by Adrian Perez de Castro.
xkb_x11_keymap_new_from_device()
failing when the keymap contains key types with missing level names, like the one used by the numpad:mac
option in xkeyboard-config. Regressed in 1.2.0.xkb_x11_keymap_new_from_device()
is much faster. It now performs only 2 roundtrips to the X server, instead of dozens (in first-time calls).
Contributed by Uli Schlachter.
xkb_keysym_from_name()
is much faster.0x12AB
and U12AB
are parsed more strictly. Previously the hexadecimal part was parsed with strtoul()
, now only up to 8 hexadecimal digits (0-9A-Fa-f
) are allowed.xkb_compose_table_new_from_locale()
and similar) is much faster.poll()
instead of epoll()
for xlbcli interactive-evdev
, making it portable to FreeBSD which provides evdev but not epoll. On FreeBSD, remember to install the evdev-proto
package to get the evdev headers.xkb-format-text-v1.md
file in the HTML documentation. This file existed for a long time but only in the Git repository. Link: https://xkbcommon.org/doc/current/md_doc_keymap_format_text_v1.htmlAdd partial documentation for xkb_symbols
to xkb-format-text-v1.md
.
Contributed by Simon Zeni.
Update keysym definitions to latest xorgproto. In particular, this adds many special keysyms corresponding to Linux evdev keycodes.
Contributed by Peter Hutterer <@who-t.net>.
XKB_KEY_*
definitions to list here.xkb_x11_keymap_new_from_device()
in some unclear situation (bug introduced in 1.0.2).xkb_x11_keymap_new_from_device()
don’t have level names (bug introduced in 0.8.0).XKB_KEY_NoSymbol
instead.xkb_x11_keymap_new_from_device()
on repeated calls in the same xkb_context()
.tool-option-parsing
test failing.xkbcli how-to-type
aligned.Note: this release is API and ABI compatible with previous releases –the major version bump is only an indication of stability.
Add libxkbregistry as configure-time optional library. libxkbregistry is a C library that lists available XKB models, layouts and variants for a given ruleset. This is a separate library (libxkbregistry.so
, pkgconfig file xkbregistry.pc
) and aimed at tools that provide a listing of available keyboard layouts to the user. See the Documentation for details on the API.
Contributed by Peter Hutterer <@who-t.net>.
Better support custom user configuration:
Allow including XKB files from other paths.
Previously, a symbols/us
file in path A would shadow the same file in path B. This is suboptimal, we rarely need to hide the system files - we care mostly about extending them. By continuing to check other lookup paths, we make it possible for a $XDG_CONFIG_HOME/xkb/symbols/us
file to have sections including those from /usr/share/X11/xkb/symbols/us
.
Note that this is not possible for rules files, which need to be manually controlled to get the right bits resolved.
Add /etc/xkb as extra lookup path for system data files.
This completes the usual triplet of configuration locations available for most processes:
/usr/share/X11/xkb
/etc/xkb
$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.
Contributed by Peter Hutterer <@who-t.net>.
Add an xkbcli
command-line utility.
This tool offers various subcommands for introspection and debugging. Currently the available subcommands are:
See the manpages for usage information.
Contributed by Peter Hutterer <@who-t.net>.
Add xkb_utf32_to_keysym()
to translate a Unicode codepoint to a keysym. When a special keysym (XKB_KEY_
constant) for the codepoint exists, it is returned, otherwise the direct encoding is used, if permissible.
Contributed by Jaroslaw Kubik <@froglogic.com>.
Add xkb_keymap_key_get_mods_for_level()
which retrieves sets of modifiers which produce a given shift level in a given key+layout.
Contributed by Jaroslaw Kubik <@froglogic.com>.
Add xkbcli how-to-type
command, which, using xkb_utf32_to_keysym()
and xkb_keymap_key_get_mods_for_level()
and other APIs, prints out all the ways to produce a given keysym.
For example, how to type ?
(codepoint 63) in a us,de
keymap?
$ xkbcli how-to-type --layout us,de 63 | column -ts $'\t' keysym: question (0x3f) KEYCODE KEY NAME LAYOUT# LAYOUT NAME LEVEL# MODIFIERS 20 AE11 2 German 2 [ Shift ] 20 AE11 2 German 2 [ Shift Lock ] 61 AB10 1 English (US) 2 [ Shift ]
Search for Compose in $XDG_CONFIG_HOME/XCompose
(fallback to ~/.config/XCompose
) before trying $HOME/.XCompose
.
Note that libX11 still only searches in $HOME/.XCompose
.
Contributed by Emmanuel Gil Peyrot <@linkmauve.fr>.
Fix building X11 tests on PE targets.
Contributed by Jon Turney <@dronecode.org.uk>
xkb_utf32_to_keysym
xkb_keymap_key_get_mods_for_level
XKB_KEY_XF86FullScreen
Add $XDG_CONFIG_HOME/xkb
to the default search path. If $XDG_CONFIG_HOME
is not set, $HOME/.config/xkb
is used. If $HOME
is not set, the path is not added.
The XDG path is looked up before the existing default search path $HOME/.xkb.
Contributed by Peter Hutterer <@who-t.net>.
Add support for include statements in XKB rules files.
This is a step towards making local XKB customizations more tenable and convenient, without modifying system files.
You can now include other rules files like this:
! include %S/evdev
Two directives are supported, H
to $HOME
and S
for the system-installed rules directory (usually /usr/share/X11/xkb/rules
).
See commit message ca033a29d2ca910fd17b1ae287cb420205bdddc8 and doc/rules-format.txt in the xkbcommon source code for more information.
Contributed by Peter Hutterer <@who-t.net>.
Downgrade “Symbol added to modifier map for multiple modifiers” log to a warning.
This error message was too annoying to be shown by default. When working on keymaps, set XKB_LOG_LEVEL=debug XKB_LOG_VERBOSITY=10
to see all possible messages.
Support building on Windows using the meson MSVC backend.
Contributed by Adrian Perez de Castro <@igalia.com>.
Fix bug where the merge mode only applied to the first vmod in a virtual_modifiers
statement. Given
augment virtual_modifiers NumLock,Alt,LevelThree
Previously it was incorrectly treated as
augment virtual_modifiers NumLock; virtual_modifiers Alt; virtual_modifiers LevelThree;
Now it is treated as
augment virtual_modifiers NumLock; augment virtual_modifiers Alt; augment virtual_modifiers LevelThree;
Reject interpret modifier predicate with more than one value. Given
interpret ISO_Level3_Shift+AnyOf(all,extraneous) { ... };
Previously, extraneous (and further) was ignored. Now it’s rejected.
Speed up and improve the internal xkeyboard-config
tool. This tool compiles all layout/variant combinations in the xkeyboard-config dataset and reports any issues it finds.
Contributed by Peter Hutterer <@who-t.net>.
secure_getenv(3)
, e.g. GDM.~/.xkb
to before XKB_CONFIG_ROOT
(the system XKB path, usually /usr/share/X11/xkb
) in the default include path. This enables the user to have full control of the keymap definitions, instead of only augmenting them.Level20
was dumped, but only up to Level8
is accepted by the parser. Now 20
is dumped.Change level references to always be dumped as e.g. 5
instead of Level5
.
Change group references to always be dumped capitalized e.g. Group3
instead of group3
. Previously it was inconsistent.
These changes affect the output of xkb_keymap_get_as_string()
.
interactive-wayland
test program to the stable version of xdg-shell
.XKB_KEY_XF86MonBrightnessCycle
XKB_KEY_XF86RotationLockToggle
xkbcommon-x11.pc
missing the Requires specification.xkb_geometry
section.free()
when using multiple keysyms.xkb_keysym_to_utf8()
and xkb_keysym_to_utf32()
.xkb_keysym_to_{upper,lower}
to perform case-conversion directly on keysyms. This is useful in some odd cases, but working with the Unicode representations should be preferred when possible.signifblank
and permille
keysyms.Fixed a bug in the parsing of XKB key type definitions where the number of levels were determined by the number of level names. Keymaps which omit level names were hence miscompiled.
This regressed in version 0.4.3. Keymaps from xkeyboard-config were not affected since they don’t omit level names.
xkb_keysym_to_upper()
xkb_keysym_to_lower()
Added a Meson build system as an alternative to existing autotools build system.
The intent is to remove the autotools build in one of the next releases. Please try to convert to it and report any problems.
See http://mesonbuild.com/Quick-guide.html for basic usage, the meson_options.txt
for the project-specific configuration options, and the PACKAGING file for more details.
There are some noteworthy differences compared to the autotools build:
docs
, x11
, wayland
). The build fails if any of the required dependencies are not available. To disable a feature, pass -Denable-<feature>=false
to meson.-Ddefault_library=shared/static
option. With autotools, both versions are installed by default.xorg-util-macros
is not used.Android.mk
support.*-uninstalled.pc
pkgconfig files.interactive-wayland
demo program to v6 of the xdg-shell
protocol.XKB_KEY_XF86Keyboard
XKB_KEY_XF86WWAN
XKB_KEY_XF86RFKill
XKB_KEY_XF86AudioPreset
Fixed various reported problems when the current locale is tr_TR.UTF-8
.
The function xkb_keysym_from_name()
used to perform case-insensitive string comparisons in a locale-dependent way, but required it to to work as in the C/ASCII locale (the so called “Turkish i problem”).
The function is now no longer affected by the current locale.
Added support for different “modes” of calculating consumed modifiers. The existing mode, based on the XKB standard, has proven to be unintuitive in various shortcut implementations.
A new mode, based on the calculation used by the GTK toolkit, is added. This mode is less eager to declare a modifier as consumed.
enum xkb_consumed_mode
XKB_CONSUMED_MODE_XKB
XKB_CONSUMED_MODE_GTK
xkb_state_key_get_consumed_mods2()
xkb_state_mod_index_is_consumed2()
xkb_keymap_get_as_string()
documentation.XKB_CONFIG_ROOT
environment variable is set, it is used as the XKB configuration root instead of the path determined at build time.An XKB keymap provides a name for each key it defines. Traditionally, these names are limited to at most 4 characters, and are thus somewhat obscure, but might still be useful (xkbcommon lifts the 4 character limit).
The new functions xkb_keymap_key_get_name()
and xkb_keymap_key_by_name()
can be used to get the name of a key or find a key by name. Note that a key may have aliases.
xkb_keymap_key_by_name()
xkb_keymap_key_get_name()
xkbcommon/xkbcommon-compose.h
header file for more details.terminate:ctrl_alt_backspace
instead of terminate:ctrl_alt_bksp
.Removed several compatablity symbols from the binary (the API isn’t affected). This affects binaries which
Such a scenario is likely to fail already.
map[None] = Level2;
were ignored.XKB_COMPOSE_*
xkb_compose_*
Fixed a bug which caused xkb_x11_keymap_new_from_device()
to misrepresent modifiers for some keymaps.
xkb_x11_keymap_new_from_device()
to ignore XKB PrivateAction
’s.xkb_state_update_mask()
. Previously the given state components were used as-is, without considering virtual modifier mappings. Note: this only affects non-standard uses of xkb_state_update_mask()
.x11comp
. The test uses the system’s Xvfb server and xkbcomp. If they do not exist or fail, the test is skipped.--enable-x11
to ./configure
would in fact disable it (regressed in 0.4.1).@since
version annotations to the API documentation for everything introduced after the initial stable release (0.2.0).src/x11/util.c:adopt_atoms()
error-handling code. Note: it seems impossible to trigger in the current code since the input size cannot exceed the required size.xkb_state_key_get_utf{8,32}()
. They combine the operations of xkb_state_key_get_syms()
and xkb_keysym_to_utf{8,32}()
, and provide a nicer interface for it (especially for multiple-keysyms-per-level).The xkb_state_key_get_utf{8,32}()
functions now apply Control transformation: when the Control modifier is active, the string is converted to an appropriate control character. This matches the behavior of libX11’s XLookupString(3)
, and required by the XKB specification: https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Control_Modifier
Make xkbcommon-x11 work with the keymap reported by the XQuartz X server.
xkb_state_key_get_consumed_mods()
xkb_state_key_get_utf8()
xkb_state_key_get_utf32()
XKB_MAP_COMPILE_PLACEHOLDER,
XKB_MAP_NO_FLAGS
use XKB_KEYMAP_NO_FLAGS
instead.xkbcommon-x11
, to support creating keymaps with the XKB X11 protocol, by querying the X server directly. See the xkbcommon/xkbcommon-x11.h
header file for more details. This library requires libxcb-xkb >= 1.10
, and is enabled by default. It can be disabled with the --disable-x11
configure switch. Distributions are encouraged to split the necessary files for this library (libxkbcommon-x11.so
, xkbcommon-x11.pc
, xkbcommon/xkbcommon-x11.h
) to a separate package, such that the main package does not depend on X11 libraries.XKB_MOD_NAME_NUM
for the usual NumLock modifier. xkb_x11_*
types and functions, XKB_X11_*
constants.xkbcommon: ERROR
by default, instead of xkbcomp-like Error:
.xkb_keysym_get_one_sym()
, to match the behavior specified in the XKB specification: https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Lock_ModifierXKB_KEY_XF86AudioMicMute
keysym from xproto 7.0.24. XKB_KEYSYM_NO_FLAGS
XKB_CONTEXT_NO_FLAGS
XKB_MAP_COMPILE_NO_FLAGS
xkb_keymap_min_keycode()
xkb_keymap_max_keycode()
xkb_keymap_key_for_each()
*_unref()
functions; do nothing instead of crashing.xkb_keymap_num_levels_for_key()
and xkb_keymap_get_syms_by_level()
now allow out-of-range values for the layout
parameter. The functions now wrap the value around the number of layouts instead of failing.xkb_keysym_get_name()
now types unicode keysyms in uppercase and 0-padding, to match the format used by XKeysymToString()
.xkb_keymap_new_from_names()
now accepts a NULL value for the names
parameter, instead of failing. This is equivalent to passing a struct xkb_rule_names
with all fields set to NULL.xkb_keymap_new_from_buffer()