Bug 509455 - Enable keyboard layout preview when symbols file is not in '/usr/share/X11/xkb/symbols'
Summary: Enable keyboard layout preview when symbols file is not in '/usr/share/X11/xk...
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keyboard (other bugs)
Version First Reported In: 6.4.4
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-13 12:48 UTC by pg_tips
Modified: 2025-09-17 15:45 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pg_tips 2025-09-13 12:48:02 UTC
SUMMARY
When a custom keyboard layout is set up, and its symbols file is not located in '/usr/share/X11/xkb/symbols' but instead is in one of the other valid directories (see https://xkbcommon.org/doc/current/user-configuration.html#user-config-locations), no layout preview is available.

This is known behavior (the error message explicitly says "Previewing layouts that are defined outside your systems xkb directory is not supported and will also trigger this message."

However, it would be good to fix this and allow a preview when the symbols file is located in one of the other valid directories.

Particularly, users of "immutable" distros (such as KDE Linux) where /usr is read-only have no way of creating a custom keyboard layout that supports the preview functionality.


STEPS TO REPRODUCE
1. Create a custom keyboard layout whose files are stored under (for example) ~/.config/xkb/
2. In the Plasma System Settings app (Keyboard section), add the layout to the user's available layouts
3. Still in the System Settings app, click the three-dot menu at the right-hand side of the row for that layout, and select "Preview"

OBSERVED RESULT
In the preview window, no preview is shown, with a message "The keyboard geometry failed to load. [...] Previewing layouts that are defined outside your systems xkb directory is not supported and will also trigger this message"

EXPECTED RESULT
A valid preview should be shown.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 42
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
In tastenbrett's main.cpp, the 'findXkbRulesFile()' method seems to be hardcoded to examine only a single directory.