Keyboard support on OSMC?

We have a plexgear 94759 mini keyboard, but I have never gotten the layout right. It just works as a US/UK keyboard, despite me having chosen “Swedish qwerty” as layout. This has worked anyhow as most search engines will accept a instead of åä, or o instead of ö, but I would still like to fix it. How do I proceed. I have chosen Swedish in OSMC and location Finland.

Second question: The keyboard has dedicated multimedia buttons for volume/mute/search etc. How do I figure out the kodes to be able to activate those in keymap.xml?

As of today local keyboard layouts need to be set manually, see this post

They easiest is to enable debug logging and have a tail on the log file tail -f /home/osmc/.kodi/temp/kodi.log

I guess those commands can be entered from an SSH shell as well? Edit: Ah, scratch that. Typed before I read your link :slight_smile: But the second command gives a list of scary choices:

Policy for handling keymaps: x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x xSelect keymap from arch list x x
x xDon’t touch keymap x x
x xKeep kernel keymap x x
x xSelect keymap from full list x x
x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
x < OK >

Edit : sudo loadkeys de-latin1 gives a German layout, right? sudo loadkeys sv-latin1
does not work (file not found)

You will need to issue sudo loadkeys se-latin1. Other options to try are:


depending on the exact keyboard layout you have.

Sorry, but they are all broken. The two first give me a german layout, the two second a Danish one…

Hmm. IIRC se-latin1 worked for me when I was working on it last year. What is the output of

ls /usr/share/keymaps/i386/qwerty/se*?


Trying: sudo loadkeys se-latin1… works perfectly! Silly me, tried sv- and sw-, but not se-

Now, to the next question. The multimedia keys on the keyboard do not create any keyboard event in the log. I was going to try to get the scancodes by esacping to the commandline on the Vero, but that is unfortunately a nono, because of the resolution problems on Vero, so I plugged that same kb into the PC and found that mute/volup/voldn generate “windows” dodes 173, 174, 175, but no BIOS codes. How do I get OSMC to recognise them?


Keys without a scancode are not recognized by the kernel; these can include additional keys from “gaming” keyboards, etc.


If you do not get any scancodes at all when pressing would indicate that they are not transmitted as part the default keys and would require a specific driver

Pity :frowning: Sonce this is not really OSMC related, but rather Linux, I will try other support fora.

Typically, Kodi recognizes the + and - keys of a keyboard to control volume.

Yes. I know and now that I have gotten the layout sorted it might even work. Sadly the kb has no dedicated numeric keypad and the Fn key does not seem to work for the laptop-style pad.

IIRC the ‘normal’ keys (_/- and +/= on a UK kb) work.

I am still wondering if the keyboard really need a special driver. Maybe check again on the console if the keys really don’t produce scancodes. Use showkey --scancodes

I have a multimedia keyboard where I would say 80% of the special keys still produce a scancode.

Yes. I tested both on linux (showkey) and win. There is no scancode.

In Kodi v18 this will not be necessary


The keyboard workaround? Not a big problem. Just a bit confusing when the layout selection in the ui does not do anything :relaxed:

Keep up the good work!

I guess I need to put this somewhere to survive a reboot? /etc/rc.local? Or use localectl??

Try it without. I think the setting sticks by itself. I never had any luck with localectl IIRC, anyway.

I did, that is why I asked. It does not survive a reboot.

OK, use rc.local for now. Apparently, keyboard layout support is easier in Leia.