xkbcommon / libxkbcommon

keymap handling library for toolkits and window systems
https://xkbcommon.org
Other
286 stars 125 forks source link

Remove the 4 layout limit on Wayland. #37

Open ApostolosB opened 8 years ago

ApostolosB commented 8 years ago

Can something be done about it. I know on X it is a hard limit but can libxkbcommon be modified for allowing more than 4 keyboards on WL?

Thanks in advance.

bluetech commented 8 years ago

This is definitely desirable. For the current status, see the comment here: https://github.com/xkbcommon/libxkbcommon/blob/d58fc90a2917e482470e74a662373f85ccb23f31/src/keymap.h#L91

I provide some additional details here on the problem, in case someone other than me reads this and wants to jump in.

First, the format of the "rules" file is described here: https://github.com/xkbcommon/libxkbcommon/blob/master/doc/rules-format.txt

Currently, the most used file is the "evdev" one, commonly found in /usr/share/X11/xkb/rules/evdev. This file is built up using some scripts as can be seen here: https://cgit.freedesktop.org/xkeyboard-config/tree/rules

The problem is that the format is really inflexible about the number of layouts (groups), and so it hardcodes and repeats 1,2,3,4. Hence, if we just lift the limit, some unexpected things may start to happen starting from the 5th group.

Some ways to proceed, from most preferable to least preferable:

That's it - needs a small effort to push through.

wismill commented 4 months ago

362 is a first step to support it in rules.

wismill commented 1 month ago

362 has been merged.