I created a custom keyboard layout with Microsoft Keyboard Layout Creator (MSKLC) for my Windows 10 machine. The custom keyboard layout is based on the Swiss German Layout and the numbers are swapped with symbols. After the installation of the new layout, it works fine. I have two options to install it:
- Register a completely new keyboard layout on the system and select it in the keyboard settings, or
- Replace the Keyboard-Layout-DLL file on Windows/System32 with the newly created layout (e.g. Swiss French since I never use it) and select the Swiss-French keyboard layout in the settings
On the same machine, I also use Ubuntu with WSL. However, I don't use Windows Terminal to access the shell but I use gnome-terminal via WSLg (X11 / Wayland). Everything started via WSLg seems to recognize the selected Keyboard Layout (e.g. Swiss French) but it applies the corresponding keyboard layout which is installed on the Linux system; so it's not the custom layout but the original Swiss-French layout.
MSKLC generates a KLC file but I'm not sure how I can convert it and replace the Swiss-French layout on Ubuntu with it. I didn't have luck with KLFC to do this. Basically, I need to apply the same changes for the Swiss-French layout on my Ubuntu machine (WSL).
Or would it be easier to register a completely new layout (option 1) and also create a completely new one for Ubuntu? But how are they linked to each other then? How does Windows tell the selected keyboard layout to WSLg?