Branch
Hash :
05ba96db
Author :
Date :
2024-08-20T16:41:38
rules: Fix wild card handling The handling of wild card `*` is different in libxkbfile and X server: wild card matches empty strings for model and option but not for layout nor variant, while in libxkbcommon wild cards always match empty strings. See: - https://gitlab.freedesktop.org/xorg/lib/libxkbfile/-/blob/bf985c68acb1244f51ec91414532a2347fbc1c4c/src/maprules.c#L687 - https://gitlab.freedesktop.org/xorg/lib/libxkbfile/-/blob/bf985c68acb1244f51ec91414532a2347fbc1c4c/src/maprules.c#L712 The difference of handling between the components is unfortunately not documented, but we should follow the behavior of the original implementations for consistency. - Fixed by implementing the same behavior than libxkbfile. - Added tests and fixed failing tests. - Improve the documentation of rules to highlight the special behavior.
! $model_group = pc101 pc102 \
pc104\
pc105\
pc106
! $layout_group = ar br cr us
! $variant_group =
! model = keycodes
$model_group = something(%m)
* = default_keycodes
! layout variant = symbols
$layout_group * = my_symbols+%(v)
* * = default_symbols
! layout = symbols
$layout_group = my_symbols+%(v)
* = default_symbols
! model = types
* = default_types
! model = compat
* = default_compat