KLang! - Keyboard Layout and Variation Changer is a plugin for decky-loader which lets the user change layout and variant of external keyboards IN GAMING MODE.
When starting a game in gaming mode, the game will read the default keyboard layout and variant from steamOS. If this is set to US - which it is by default - you are stuck with the QWERTY layout. This plugin resolves this problem.
You can now freely choose which layout SteamOs uses.
These changes not only affect your games but the steamOs and its gaming mode too!
The Steam Deck already has options for setting keyboard layouts, so why does this exist?
Unfortunately that option only applies to the on-screen keyboard and not external keyboards connected via bluetooth.
Luckely a workaround has been found by the user "KS-HTK" on github. So all credits for the workaround goes to them. See here
Gamescope lacks the ability to change layouts for external keyboards, so by writing XKB_DEFAULT_LAYOUT=<layout>
and XKB_DEFAULT_VARIANT=<variant>
into /etc/environment
, are we able to bypass this problem.
<layout>
is retrieved by getting a list of available layouts via localectl list-x11-keymap-layouts
<variant>
is retrieved by getting a list of available variants localectl list-x11-keymap-variants <layout>
And that's exacly how this plugin works. Yes it's a bit boring and a dry read but I wanted to keep things as clear as possible.
Don't panic your data is not lost. So whats going on here, is that if any of the 2 variables XKB_DEFAULT_LAYOUT
or XKB_DEFAULT_VARIANT
are set to an invalid value the operating system is confused and refuses to load.
please refer to this or the instuctions below (they are the same) to recover your Steam deck:
power + QAM
(three white dots button).mkdir ~/steamos_current
sudo mount.steamos -o nohome,noboot /dev/nvme0n1 ~/steamos_current
~/steamos_current/etc/environment
and remove XKBE_DEFAULT_LAYOUT
and XKB_DEFAULT_VARIANT
with their values from the file, save and close the file.This should have fixed the stuck boot issue. If you experience any other problems please let me know by creating an issue in this repo.