EN-GB / EN-US issues with keyboard, github link not helping, *VM*


Discussed here, I’m jaxjexjox at the bottom.

Anyone got this working? I don’t know what the heck to do. I’ve tried all kinds of fixes, re-installing, configuring to US it just refuses to flip

sudo nano /boot/dietpi.txt - there’s a line which clearly states

Changed to US - didn’t fix, tried adding locale etc?
Is it because it’s a VM? the installer CLEARLY states attempting to change keyboard without a keyboard installed will go nasty?

Change KEMAP=uk to KEYMAP=us in /etc/vconsole.conf

Xwindows default keboard settings can be set by adding/changing /etc/default/keyboard
note: will have to restart Xwindows or type th ecommand udevadm trigger --subsystem-match=input --action=change

Looks like the problem is being caused by LC_ALL setting (line #177 in /DietPi/dietpi/func/dietpi-globals)

I removed the en_UK ones – which caused the abov e line 177 error.
need to run the following command and select the relevant en_US encodings to generate.
run locale-gen
aftwerwards, locale -a should show the en_US encodings selected.
the en_US encodings should also be placed in /etc/locale.gen

I thought they fixed the bug in a new release?

Image v6.25 is the oen I pulled from dietpi.com download ling.
I haven’t checked out the latest v.6.26 update from githup, so
don’t know if the issue is fixed in v6.26.

Set up both EN-GB and EN-US just in case…don’t remve the EN-GB thought…some of the core programs/settings might still rely upon that locale

I dont’ entirely recall how it was fixed, but I would say it was a little frustrating, primarily because I use things like @ in my passwords - which of course ends up being "

So you SSH in, the keymap is fixed of course ,but you’re keying in @ when the “real” password is "

They’ll fix it in full eventually I’m sure
Thanks all

Doesn’t look like the issue was fixed in v6.26 per https://github.com/MichaIng/DietPi/issues/2912#issuecomment-532100542

IMHO, shouldn’t be using LC_ALL, should add the relevant LC_ variables.
My suggestion would be to remove LC_ALL so there’s no possibility of it overriding the keyboard (or other settings),
using LANG instead and/or offer an editable list of LC_ environment variable defaults if there issues of
other LC_ variables not being set to a given default value.


Sticking to the dietpi keep is simple / small:
Add a script to display/set LC_ALL from available encodings as listed by the command ‘locale -a’
with an option to add/remove encodings for changing LC_ALL to via command ‘run locale-gen’
This will override manual changes to LC_ variables done post install until LC_ALL is disabled as
a global default.

Instead of hardwireing LC_ALLL, set it to what’s output by the command ‘cat /etc/default/locale | grep LC_ALL’
then if LC_ALL does’t exist – offer the list of options stated previously.