New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pluggable layout support #40
Comments
|
I agree this is desirable. There are a few parts here:
The Overall we need to come up with a complete coherent design for this; unfortunately the original design of the RMLVO system did not consider this use case. |
|
Oops, I confused |
It doesn’t seem to work. |
|
It's a bit confusing, however If you use a Wayland compositor, then it does use libxkbcommon. |
|
Ok, so how are we supposed to use a custom layout? Is there a method that’s working both on Xorg and Wayland, besides editing system files directly? |
|
Perhaps |
|
I use Also I read here about |
On Wayland, you'll need to use whatever is your compositor's method of configuring XKB. But ~/.xkb will be in the search path by default.
This was never implemented. |
So could I drop one or a few files for a custom keyboard layout in |
|
Couldn't the evdev.xml files be generated dynamically? It looks like the rule files pretty much contain the same data. I might eventually try and build some kind of prototype of the generation algorithm, but I don't feel qualified to work on the xkb itself. |
|
the biggest problem with But, fwiw, the rules files are slightly different to the xml files and do not contain the same data - though anything listed in one will/should/must have an entry in the other. You could merge both together and split them back out during build but I doubt there's a lot of value in that. |
|
i didn't read the PRs that precisely (and in particular didn't read the code), but i gained the impression that they're only about user-level ($HOME) overrides. while helpful, that doesn't cover the system-wide use case particularly well - that would require systemd-ish .d directories or more traditional "shadow" directories like (/usr/local/)site-xkb/ (compare perl) and/or /etc/xkb. please clarify. |
|
the $HOME overrides are the primary use-case but that's largely controlled by include paths. The infrastructure is now in place to add additional include paths though tbh a Having said that - I wonder how much of that is needed. If you have a few enthusiastic users during a testing phase, they'd likely be happy to install in $HOME. Once you're past that stage merging into xkeyboard-config is the way to go anyway. So that intermediate stage of site-wide but not upstream yet - is this a common enough use-case to support? |
|
my use case is that i use the us(altgr-intl) layout with swapped y & z keys (guess why ...). that's needed system-wide (for the VT setup, then the login manager's keymap) and at user level (GUI switcher in KDE). i have my doubts that this would be ever accepted upstream ... |
|
I think it would be possible to extend libxkbcommon's meson options to make Would need some further investigation for all the corner-cases but this seems to be the easiest way to handle this. |
|
I've had a look at the above and while it appears relatively trivial to add a single path, that's not true for the colon-separated list. Let's say we add an extra path so our lookups are, in that order:
For rules files we shadow files, ruleset To include, we need a path and the two placeholders Yes, you could have an Notable, libxkbregistry XML handling does not shadow, it merges all For kccgst files we currently also shadow files but this is a problem. The file As for a Finally: we could change kccgst to have a merge behaviour so that the So in summary:
|
|
the path stacking problem is rather easily addressed by something like gcc's #include_next statement. |
|
Good point, but I'm not sure |
|
hiding (in the sense of overriding) may make sense to (temporarily) mask an error in the system/distribution without modifying it and without confusing users with new configuration choices. |
|
Yeah, ftr, I can come up with some niche use-cases where it makes sense (like the one you mentioned) but supporting those is not really our priority :) |
|
So, the next step will be to make GNOME and other desktop environments to use libxkbregistry, like this? By the way, is there a risk of systemd somehow misbehaving on systems that have only one user, and that user has sudo permissions? In such cases, the per-user locale and keyboard settings are applied system-wide, IIRC. |
|
not sure how exactly that would happen, tbh. all we're using here is But otherwise, the same rules apply - if you set a configuration that doesn't exist, parsing the keymap will fail. and if you set a global configuration to a keymap that's private to a user's home directory, that too will fail because from XKB's point of view, the configuration doesn't exist. |
|
@ilmaisin - I'm very keen to have pluggable layout support in gnome 3 on Ubuntu (20.04 onwards). I've subscribed to https://gitlab.gnome.org/GNOME/gnome-desktop/-/merge_requests/79 - is there anything else I should subscribe to for updates? |
The qwerty-lafayette is a new qwerty-bqsed french layout that is not yet reqdy to be included in the xkb maps. Still, it would be desirqble for users to be able to install this layout (see issue fabi1cazenave/qwerty-lafayette#15 in French).
The diff required to install this layout system-wide is: https://gist.github.com/fabi1cazenave/2171d69d3d8d6e298225
The problem with this diff is that it is not possible to create a package from it because it requires patching the rules files. It would be desirable if libxkbcommon could read additional rule files in directories.
For example,
/usr/share/X11/xkb/rules/evdev.d/lafayette.lstand/usr/share/X11/xkb/rules/evdev.d/lafayette.xmlcould be read as part of/usr/share/X11/xkb/rules/evdev.lstand/usr/share/X11/xkb/rules/evdev.xmlrespectively.It would be even better if libxkbcommon could read files from
~/.xkb/rules/evdev.d/*.{lst,xml}The text was updated successfully, but these errors were encountered: