Skip to content

XKB can't load layout filenames with hyphens in, which KLFC generates automatically #63

@fazzaan

Description

@fazzaan

Some of my KLC files from MSKLC have hyphens in the layout names.
When converting them using KLFC, the hyphens are preserved in the file names.
For the last week, I've been struggling to work out why one of my layouts works flawlessly, while the other 3 simply won't type anything.
Despite being displayed in the keyboard layout selection list after installation, they just won't work.

This morning I finally figured it out when I noticed that the functional layout's xkb filename is just alphabetic characters, while the other three had hyphens in.

I removed the hyphens from the filenames and the corresponding entries in the {/usr/share/X11}{~/.config}/xkb/rules/evdev.xml file and lo and behold, suddenly the layouts worked!

While this issue remains, could you mention on the guide to remove hyphens from source layout names?


Slightly off topic -- if you use Fcitx (or perhaps other IME handlers), you don't need to reset your login session each time you install or edit a keyboard layout! The Fcitx menu has a "Reload configuration" entry, which makes all xkb and evdev.xml edits immediately available to the system, both in the Fcitx layout menu and the Gnome system settings layout menu.
This massively speeds up the process of editing & testing layout modifications. Maybe you could mention this in the guide, because every other guide I found online tells us that we have to log out and back in if we're using Wayland.


Thank you so much for this layout conversion project! It bootstrapped me into understanding the Linux keyboard layout system, and after digging through a tonne of websites, I understand it better. I'm gradually building a website of guides, tips and tricks for computing, including transitioning to Linux, and I'll certainly mention your project on my section about keyboard customisation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions