17.6 Keyboard Layout is incorrect


i was not able to get the correct keyboard layout since the update to 17.6
I’m using a French keyboard that was working well before

I tried the following cmd :

# dpkg-reconfigure console-data
# dpkg-reconfigure keyboard-configuration
# service keyboard-setup restart 

no luck

I have the same problem with Swedish/Finnish keyboard. OSMC language is English and regional settings is Finnish and I get US keyboard layout

Try sudo dpkg-reconfigure locales

1 Like

sudo loadkeys fr-x11

sudo loadkeys se-latin1 works, but let me know if Finnish is different.

1 Like

do you need sudo dpkg-reconfigure locales before sudo loadkeys I have a layout issue with a German BT keyboard.

It works for me without that. Try just sudo loadkeys de-latin1

What’s puzzling me is how you guys made this work before the latest release!

Ty, it works well until the next reboot.

OK. You will have to put the loadkeys in rc.local then. Soon we will have it persistent OOTB and linked to the on-screen kb layouts/locale settings.

Meanwhile it would be good to get some feedback on which keymaps work for you, eg do we need variants like Belgian/Canadian French.


can you give me a line to add to rc.local ?

What works for me is Fr / French


just loadkeys fr-x11

I found fr-x11 was closer to the layout you get if you google French keyboard. YMMV.

1 Like

It’s all good !
fr-x11 is what I was using previously and i never had problems with non working keys.
I will wait for the next update then i will remove the rc.local extra line and see how it works.
thanks a lot.


I also tried running, in my case, sudo loadkeys be-latin1 with limited results though; keys such as #, @, <, [, {, £ were not mapped correctly.

A variety of keyboard layouts are stored in /usr/share/keymaps/ for PC, Mac, etc.

For my Bluestork Bluetooth Belgian AZERTY keyboard (with a bit of exotism), I (accidently) managed to find the closest keyboard layout from here: /usr/share/keymaps/mac/mac-fr-ext.kmap.gz


To use this layout:

$ sudo mkdir -p /usr/local/share/keymaps/mac/
$ cd /usr/local/share/keymaps/mac/
$ sudo cp /usr/share/keymaps/mac/mac-fr-ext.kmap.gz ./
$ sudo gunzip mac-fr-ext.kmap.gz
$ sudo loadkeys /usr/local/share/keymaps/mac/mac-fr-ext.kmap

Follow this wiki to run a script on startup to avoid running manually sudo loadkeys … after every reboot—although you could use ctrl + R to retrieve it quickly by only typing loadkeys.

You should now get a working keyboard in the console.

If some key does not work, get its key code:

$ sudo showkey -k

You should get the key code for your key.

Find the relevant line in mac-fr-ext.kmap (with text editor nano, vi, etc.) and change the key code.

For example, in my case, I had to remap function keys from F1 to F5, the Escape key, the at sign key, and the less-than sign key. I also had to replace Caps_Lock by Shift_Lock for key code 58.

keycode	172 = Escape
keycode	86 = at

keycode  58 = Shift_Lock
keycode  41 = less

string F1 = "\033[11~"
string F2 = "\033[12~"
string F3 = "\033[13~"
string F4 = "\033[14~"
string F5 = "\033[15~"

My keyboard is now mapped correctly for use in the console.

If you are running Kodi 18 (recommended!) you can set the hardware kb layout through the GUI. Settings->System->Input.

1 Like