Skip to content

Conversation

@wismill
Copy link
Member

@wismill wismill commented Oct 21, 2025

Rename keys and aliases with names longer than 4 characters when serializing using XKB_KEYMAP_FORMAT_TEXT_V1, to ensure compatibility with the X11 ecosystem.

See #849 for an example of such keymap in use.

@wismill wismill added this to the 1.13.0 milestone Oct 21, 2025
@wismill wismill added X11 legacy: compatibility Indicate a need to ensure compatibility with X11 dump-keymap labels Oct 21, 2025
@wismill wismill modified the milestones: 1.13.0, 1.14.0 Nov 4, 2025
Rename keys and aliases with names longer than 4 characters when
serializing using `XKB_KEYMAP_FORMAT_TEXT_V1`, to ensure compatibility
with the X11 ecosystem.

The new name is one of the following 2 forms:
- If key name and keycode ≤ 0xfff: prefix character + hexadecimal keycode
- If alias or keycode > 0xfff: prefix character + hexadecimal incrementing
  counter.

Prefixes are chosen in the set “!#$%&'()*+,-./0” and avoid any name
conflict.

In the very unlikely case that renaming fails due to unavailable prefixes,
the original name is kept so that Wayland clients can still parse the
keymap.
@wismill wismill force-pushed the keymap/rename-long-key-names branch from 67ff7e7 to 7db3d9c Compare November 18, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dump-keymap X11 legacy: compatibility Indicate a need to ensure compatibility with X11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant