-
Notifications
You must be signed in to change notification settings - Fork 142
Labels
X11 legacy: compatibilityIndicate a need to ensure compatibility with X11Indicate a need to ensure compatibility with X11compile-keymapIndicates a need for improvements or additions to keymap compilationIndicates a need for improvements or additions to keymap compilation
Description
My keyboard layout is jp. However, after version 1.9.0, keyboard layout of any client of xwayland becomes us under both kwin and labwc compositors, which works well before the version.
The problem is that, the compat/japan file has the following section:
default partial xkb_compatibility "japan" {
interpret.repeat= False;
interpret Eisu_Shift+Lock {
action= NoAction();
};
interpret Eisu_toggle+Lock {
action= NoAction();
};
interpret Kana_Shift+Lock {
action= NoAction();
};
interpret Kana_Lock+Lock {
action= NoAction();
};
};
However, the corresponding output of xkbcli compile-keymap is:
interpret Eisu_Shift+Exactly(Lock) {};
interpret Eisu_toggle+Exactly(Lock) {};
interpret Kana_Shift+Exactly(Lock) {};
interpret Kana_Lock+Exactly(Lock) {};
which seems illegal, for example, xkbcomp fails to compile it. Therefore Xwayland also rejects the code, and thus, client's layout becomes us as a fallback layout.
If you apply the patch below to src/xkbcomp/keymap-dump.c
*** src/xkbcomp/keymap-dump.c.org 2025-05-06 22:58:33.574868229 +0900
--- ./src/xkbcomp/keymap-dump.c 2025-05-06 22:59:37.118406899 +0900
***************
*** 613,619 ****
buf->size -= sizeof(suffix) - 1; /* trailing comma */
copy_to_buf(buf, "};");
has_explicit_properties = true;
! } else if (si->num_actions == 1) {
if (!write_action(keymap, buf, &si->a.action,
"\n\t\taction= ", ";"))
return false;
--- 613,619 ----
buf->size -= sizeof(suffix) - 1; /* trailing comma */
copy_to_buf(buf, "};");
has_explicit_properties = true;
! } else if (si->num_actions <= 1) {
if (!write_action(keymap, buf, &si->a.action,
"\n\t\taction= ", ";"))
return false;
then everything goes well.
Metadata
Metadata
Assignees
Labels
X11 legacy: compatibilityIndicate a need to ensure compatibility with X11Indicate a need to ensure compatibility with X11compile-keymapIndicates a need for improvements or additions to keymap compilationIndicates a need for improvements or additions to keymap compilation