Logitech K400+ mapping problem

Hello,

I am UK Raspberry Pi 3 / OSMC user.

I have just bought a Logitech K400+ wireless keyboard.

This connects fine to RPI 3B+. The OSMC Internationalisation settings are for UK English and English QWERTY keyboard. However, in OSMC the keyboard swaps the @ and the ". That is when I press the @ key the " appears on the OSMC input field and vice versa. I think the K400+ is “appearing” as a US keyboard layout to the RPi.

When I EXIT OSMC/Kodi and drop into command line mode, and type in a few characters this “swapping” of " and @ still occurs when I type them in to the RPi command line. So I suppose (now my technical knowledge runs out) there is “some kind” of keyboard configuration error in the Linux OS that the RPi is running “underneath” OSMC that OSMC is not altering when I set the keyboard to English (UK) in OSMC.

When I connect the K400+ keyboard to a Windows machine that is configured to connect UK keyboard, all the keys are mapped correctly, for example when I press the keys for " and @ then the corresponding characters appear on the screen, say in a Word document.

Thanks

Clive

Hi,

We were planning to handle this at an OS level; but it seems that Kodi v18 should make this work as expected with its use of libinput.

Sam

Is there anything I can hack, for example some config file, through ssh to get the mapping correct?

Thanks

Clive

I had the same problem with the K400 keyboard with Danish layout and fixed it with the following command.

sudo apt install console-common

Choose “Select keymap from full list” and choose your keyboard and language.

If you need to reconfigure use this command

sudo dpkg-reconfigure console-data

I don’t recommend doing this. Installing ConsoleKit packages can cause some issues.

If you run locale -a in the CLI or via SSH what is the output?

Never had any problems with it, and it’s quite annoying that the keyboard is not mapped correct.

How would you do it @sam_nazarko?

I think Kodi v18 will handle it via new input changes.

For console usage; we can then add a callback to loadkeys the correct locale when the setting is changed via the GUI. This would mean no more CLI tinkering.

This issue has been discussed many times :grinning: hopefully it gets resolved with V18.

BTW. that’s the single thing LE actually do better, when you change language in Kodi the keyboard changes as well :slight_smile:

I think they’ve removed this for v18 from Settings add-on. The right approach is to do it in Kodi.

Sam

Agree.

That command worked fine from an ssh console. I selected UK / GB QWERTY keyboard option. The Logitech K400+ attached to RPi now seems to map the keys correctly.

Thanks,

Clive

1 Like