On 05/05/2025 18:27, Adam Williamson wrote:
On Mon, 2025-05-05 at 10:47 +0200, Jocelyn Falempe wrote:
In fact kmscon already uses locale1 to get the default keyboard layout.
https://github.com/Aetf/kmscon/blob/develop/scripts/kmscon.in
I've run some tests with a Greek layout in a VM:
VC Keymap: gr
X11 Layout: gr,us
X11 Model: pc105
X11 Variant: ,
X11 Options: grp:alt_space_toggle
1) In standard VT, qwerty is the default, but you can write Greek letter
with Meta+Key.
2) In Cage+Foot, Gnome-kiosk+ptyxis, and Kwin+Konsole, you can switch
layout with alt+space.
3) In kmscon you're stuck with the Greek layout, I wasn't able to switch
to the qwerty layout. So there is probably some fix to do there.
Thanks for testing! Great that it's working to some extent already.
Ok, I found the culprit.
In kmscon, it uses rmlvo struct with empty string for model, layout,
variant and options (if your kmscon.conf is empty):
struct xkb_rule_names rmlvo = {
.rules = "evdev",
.model = model,
.layout = layout,
.variant = variant,
.options = options
};
if model is NULL or empty string, xkbcommon will use the environment
variable XKB_DEFAULT_MODEL
but for options, if it is an empty string, xkbcommon will not use the
environment variable XKB_DEFAULT_OPTIONS
It looks like it's intended in xkbcommon:
https://github.com/xkbcommon/libxkbcommon/blob/master/src/context-priv.c#L176
So I've made a fix for kmscon:
https://github.com/Aetf/kmscon/pull/112
With that fix, you can toggle the layout, exactly the same as in other
wayland compositors.
Best regards,
--
Jocelyn
--
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue