operating-system: Unable to change keymap when directly connected to host

Describe the issue you are experiencing

I have a keyboard and small monitor plugged into the NUC on which I run Home Assistant OS (that way I can directly use the CLI in the event I have a networking issue). Unfortunately there seems to be no way of selecting the keyboard layout.

The OS is built with loadkmap enabled and I have confirmed that I can manually load a new keymap by logging into the host system and running loadkmap < mykeymap.bmap.

Unfortunately this does not persist across reboots. Is there any way of making this configurable? Alternatively, as a short term fix, is there a way to get the OS to execute the above command on startup?

What operating system image do you use?

generic-x86-64 (Generic UEFI capable x86-64 systems)

What version of Home Assistant Operating System is installed?

7.4

Did you upgrade the Operating System.

Yes

Steps to reproduce the issue

  1. Plug AZERTY keyboard,
  2. Type A
  3. See Q

Anything in the Supervisor logs that might be useful for us?

n/a

Anything in the Host logs that might be useful for us?

n/a

System Health information

No response

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 8
  • Comments: 32 (2 by maintainers)

Most upvoted comments

There should be an EASY way to change the keyboard layout of the OS. Arguments like “well it is only for debugging, you should not need that” as seen above is totally wrong.

Try debugging when single and double quotes, slash, underscore, equals sign and asterisk is NOT on the right key.

cd some/path (ohh no, not possible, can’t use slash!) ls -la (ohh no, not possible, can’t use dash!) cat *.log (ohh no, not possible, cant use asterisk)

So, please make a way to change (and persist!) the keyboard layout to the layout preferred by the user. Preferably also without having to type special characters to do so. E.g. ha keyboard set sv for Swedish, ha keyboard set da etc…

+1 ability to change keyboard layout will be much appreciated!

is it that big of a deal to use the US keyboard layout?

  • It’s the number of users taking the time to search and then report here kind of a deal. It also happens when you’re already in trouble. The least that could be done with minimum effort is to show a message “The keyboard layout is US and can not be changed” to avoid that users spend time looking for a solution - it’s that big of a deal as well.

EDIT: I do not understand the “Thumbs down” here from users that request the feature: I am in favor of having the functionnality to change the keyboard because that is very useful and avoids that a lot of people spend searching for a solution when there is no solution. And to avoid that time spent searching (times the number of users), I propose to at least show a message to the user indicating that it is useless to search. Once there is a real solution, it would be useful to show a hint how to change the keyboard setting on the console.

Agreed! This has been a tiresome issue for everyone who doesn’t have a QWERTY keyboard, and the complaints have kept bouncing back since 2019. Hope one of these suggestions gets implemented.

Is the busybox shell evaluating that by default?

I guess that would be one of the simplest approach to archive your goal.

I still feel its not worth the effort. How many times do you need to use the console, and even when, is it that big of a deal to use the US keyboard layout?

Totally get that, it’s pretty hard to debug when what you type on the keyboard does not match what shows up on the screen though

What would be the simplest way to fix that? I do not want to create an insane amount of work for that, so I don’t need a “pretty” way to do it, I’d be happy to manually edit files to make it work!

But as of now, not only is there no install-time option or GUI option for this, but since the filesystem is read-only for the most part, we can’t even upload our own keymap and add a .profile command…

Those saying that it’s not a big deal should really try using a CLI with another layout, and tell us their experience afterwards ! When you are in the CLI, it’s because you are already struggling with something, there is no need to add another layer of frustration !

requesting the same here, layout change is option is a must

+1 this is mandatory, i’m also stuck on cli, and can’t edit anything correctly…

I am fighting with Hyper-V HA OS. I swithed from docker container to hyper-v because no Add-ons store in docker

I try to debug DNS problems : Logger: async_upnp_client.ssdp Source: /usr/local/lib/python3.10/site-packages/async_upnp_client/ssdp.py:255 First occurred: 14:34:52 (20 occurrences) Last logged: 14:52:52 Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=19 read=polling write=<idle, bufsize=0>>

My Addon-store is infinite spin.

And i need add trusted proxies in configuration.yaml (HA OS acces from the web via proxy) : https://community.home-assistant.io/t/unable-to-connect-to-home-assistant-via-nginx-reverse-proxy/382937/3

No way to install vs-code becose no store access, no way to edit configuration.yaml

I am stuck in command line, and i am french, so i have fu**ing french keyboard, and no way to change keyboard to french !

All non english planet needs this ! Please do something.

And no way to copy-paste text from main PC to hyperv HA OS command line.

You can use something like this as reference but this is not the right place to ask for help with this. Don’t get me wrong this is absolutely something that should be added but where the " is is not really related to HAOS and the subscribers of this issue probably don’t want to get notified about questions like this. 1920px-KB_US-International svg

Maybe @jlpouffier could help give some more priority to this as a French Product Manager for HA.

https://docs.alpinelinux.org/user-handbook/0.1a/Installing/manual.html

apk update
apk add -s kbd-bkeymaps alpine-conf busybox-openrc
setup-keymap
# or
setup-keymap fr fr

I will try that with a ‘shell_script’ when I can.

Yes, ash is run as a login shell here so it will read /etc/profile/ and /root/.profile.

And sure, it’s not one of those things that happens a lot, but it would really increase my quality of life (and I guess at least one other person).

I’m happy to send over a PR!