Edit

kc3-lang/libxkbcommon/changes/api/262.only-one-group-per-key.bugfix.md

Branch :

  • Show log

    Commit

  • Author : Pierre Le Marre
    Date : 2024-09-30 06:13:38
    Hash : 7c4c718b
    Message : 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.

  • changes/api/262.only-one-group-per-key.bugfix.md
  • `xkb_keymap_new_from_names`: Allow only one group per key in symbols sections.
    While the original issue was [fixed in `xkeyboard-config`](https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/253)
    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`](https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/6a2eb9e63bcb3c52584580570d31cd91110d1f2e/rules/0013-modellayout_symbols.part#L2).