operating-system icon indicating copy to clipboard operation
operating-system copied to clipboard

Unable to change keymap when directly connected to host

Open friggeri opened this issue 3 years ago • 38 comments

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

friggeri avatar Mar 01 '22 22:03 friggeri

Don't think it was the intention to make that possible really. The console is only meant for debugging.

agners avatar Mar 01 '22 22:03 agners

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

friggeri avatar Mar 01 '22 23:03 friggeri

@agners an easy workaround would be to enable users to customize /root/.profile in a way similar to the way it works for /root/.ssh/authorized_keys

Would you be open to that?

friggeri avatar Mar 03 '22 05:03 friggeri

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?

agners avatar Mar 03 '22 15:03 agners

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!

friggeri avatar Mar 03 '22 16:03 friggeri

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.

warlordattack avatar Jul 16 '22 13:07 warlordattack

any update on this issue? I just ran into the same issue, can't debug, as keyboad input and on screen characters don't match

Fredyy90 avatar Nov 29 '22 08:11 Fredyy90

Pinging to see if there is any update on this issue? I do not own an US keyboard either, and it is pretty frustrating when trying to access the console.

precchia avatar Dec 14 '22 08:12 precchia

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

To make a touch typist to have to "hen peck" the keyboard, is a big deal, especially in a situation where you just want to concentrate on debugging not finding the next key to hit in the correct order.

We have a menu item to configure audio and several other items. There should really by a keyboard or keymap menu item in the cil to configure the keyboard layout. This issue is not the only one that has been opened for this. Others have been closed.

frederickjh avatar Dec 15 '22 18:12 frederickjh

If the command to change the keyboard was to get added to the cli then this issues should get moved to home-assistant/cli.

frederickjh avatar Dec 15 '22 18:12 frederickjh

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 !

n4w4k avatar Feb 24 '23 15:02 n4w4k

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

bartplessers avatar Apr 12 '23 22:04 bartplessers

Hello, I would greatly appreciate this feature too !

LaCartouche avatar May 22 '23 15:05 LaCartouche

I agree, key remapping is crucial for accessibility and personal efficiency for users familiar with alternative layouts like Dvorak. That's why modern OS's often prioritize keyboard layout configuration during setup.

CypherConjured avatar May 26 '23 01:05 CypherConjured

+1 I'm also looking for this feature (especially to be able to connect HA behind a proxy). Ideally a configuration file which could be stored on micro SD card of RaspberryPi could help to store default keymap settings and probably some other default settings

s-celles avatar Jun 24 '23 14:06 s-celles

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

gsiscotty avatar Jul 02 '23 14:07 gsiscotty

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...

erik3rik avatar Jul 24 '23 09:07 erik3rik

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.

mscott370 avatar Sep 10 '23 16:09 mscott370

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.

mdeweerd avatar Oct 01 '23 23:10 mdeweerd

+1 ability to change the keyboard layout will be highly appreciated !

lenamariahackl avatar Dec 05 '23 16:12 lenamariahackl

+1 I'm unable to run necessary fixes, because I'm unable to type the commands in the prompt.https://github.com/home-assistant/supervisor/issues/4738

rocket-plane avatar Dec 06 '23 21:12 rocket-plane

+1 It's a pain having to type with the onscreen keyboard since i'm unable to change keymap to match the real keyboard, runing haos as a VM in proxmox.

Krolow93 avatar Dec 12 '23 22:12 Krolow93

Pretty pretty pleeeeeeease with cream and a cherry on top?

This is a real PITA for anyone who doesn't use an US keyboard.

I'm aware the console is only for debugging, but debugging with a wrong keymap adds a really annoying level of complexity to it.

OlwinFroon avatar Dec 20 '23 08:12 OlwinFroon

+1 Debugging with non QWERTY Keyboard is really annoying.

Baxxy13 avatar Dec 20 '23 15:12 Baxxy13

+1 please fix it

stex66 avatar Jan 06 '24 09:01 stex66

+1 please this is really needed

agrimal avatar Jan 07 '24 16:01 agrimal

I cannot find the required " anywhere on my norwegian keyboard. So I am seriously painted into a corner! Please tell me how I can find it.

Einar-S avatar Jan 07 '24 16:01 Einar-S

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

Impact123 avatar Jan 07 '24 19:01 Impact123

Considering the age of this issue, you may have a point and this is not the right place.

What would be?

OlwinFroon avatar Jan 08 '24 06:01 OlwinFroon

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

Yes it is when you don't own a QWERTY keyboard. You get used to the switched letters pretty easily but all the special characters are an issue. And since linux commands are full of -/#":][| and whatnot, that's a real hassle. Worse for me: the Tiny French keyboard I'm using on the console doesn't even have a proper French layout (they put the special characters where they had space), so I can't really rely on a image of the US vs FR layouts.

Nickduino avatar Jan 08 '24 13:01 Nickduino