Edit

kc3-lang/libxkbcommon/test/data/rules/multiple-groups

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.

  • test/data/rules/multiple-groups
  • // Insert US layout before a single layout
    ! model layout = symbols
      *     us     = pc+%l%(v)
      *     *      = pc+us+%l%(v):2
    
    ! option          = symbols
      multiple-groups = +multiple-groups
    
    ! include evdev