Keyboard layout anomaly

I recently had occasion to wish to use either the \ or | symbol for input on the OSMC GUI.
It took a while of chasing red herrings (eg broken keyboard, adapter not working …) to find that my keyboards are being treated as USA keyboards for layout, so some of the characters aren’t in aligned with keyboard layout.
This is for OSMC upt-to-date on Vero, Pi1 and Pi2.
I’ve looked at all the settings which are for English language (not English US), and English QWERTY keyboard.
Curiously enough, when logged in via SSH all the symbols are in the marked positions.

Hi Derek,

Try logging in and running:

sudo dpkg-reconfigure locales

Then selecting the UK keyboard layout.


Thanks Sam - I’ll try that

OK - tried that, but it allows for a number of options, but not specifically keyboards, and changes nothing

When you set your country it should also change your keyboard layout.

This is quite odd. Are you experiencing this behaviour in the console or in Kodi?


In Kodi - using the console via SSH all looks OK.
Is there another console context I should check (eg exit from Kodi)?

Didn’t we see something similar recently, where a guy was getting an ‘SMS like’ keyboard layout?

I think messing with ‘Peripherals -> Input’ might yield something. There is an option on how to treat input devices.


I’ll check that thread, but so far the System|Settings|system|Input devices only shows:
Peripherals - CEC device (I don’t have any which create signals)
Enable mouse and touch screen - set on, for mouse use
Reset to default.


Can’t remember the exact setting, but there used to be something like ‘Treat remotes as keyboard devices’ or something. That might need ticking or unticking!


I remember that under the RaspBMC settings addon, but cannot find it using the OSMC skin. It was to treat remotes as keyboards (I do have some of those combined keyboard/mouse remotes), but here we are talking about bog-standard PC style keyboards.
I checked out the exit from Kodi option - same behaviour

Are you sure that was in Raspbmc Settings? I just had a look through the Raspbmc Settings addon and couldn’t find that string or option.


You’re correct - the only one under RaspBMC settings was the enable repeat filter.
I cannot find one for ‘treat remotes as keyboard’ anywhere.
BTW I don’t myself find this serious, as long as I know what the situation is - so have to rely on your judgement as to whether more time should be spent on it.
ISTR finding something like this on a raspubuntu system from several years back (don’t have it now), which might suggest Kodi as the real problem area

OK, I will try and take a look at this today with a PC keyboard.

Is it just like \ and | keys that are messed up, or are any other ones causing issues too?



From memory, keys to watch are:
It’s obvious if you look at the UK and US keyboards side by side.
I used to have pic files for these, but it’s been a long time.
In practice, none of these are very usual - but can be used at times.


Was a solution ever found for this issue?

I have a bang-up-to-date installation of OSMC on RPi 2, but within KODI my UK layout keyboard behaves as though it is a US keyboard and most of the shifted characters are therefore wrong. The same issue appears on the command line (i.e. tightly within the KODI system), whereas the SSH command line (on a remote connection) displays exactly the correct characters.
I have re-run the locales package, and have selected the GB keyboard layout. It makes no difference.

In great hope

Kenneth Spencer

Is the locale configured correctly in Settings (in Kodi)?


Thankyou Sam.

The settings in International are:
REGION: UK(24hr)
TIMEZONE: Europe/London

I may try changing the KEYBOARD and then changing it back, just in case there is an error in the KEYBOARD Setting routines …

Here’s hoping!

Kenneth Spencer

Further comment, Sam:

I note that the settings in System->Settings->Appearance->International actually refer to the Virtual Keyboard only, not the physical keyboard.

I have already tried the dpkg-reconfigure locales option but that has no effect. Is there a re-installation option that also leaves KODI settings alone, just reconfiguring the OS Settings?


Kenneth Spencer

OK: this issue is now resolved, at least for me.
Thanks to Xavgra2 I was able to add a couple of packages that take care of the console configuration, rather than just KODI.

I did this:
apt-get install console-data
apt-get install console-setup
Then I configured the console using the newly installed package:
dpkg-reconfigure console-setup

Hey presto, that resolves the problem. From the previous discussion of about eight months ago, it seems that these two packages may well be required to allow proper configuration of the console keyboard.

Kenneth Spencer

This is still an issue, years later.

Running the latest version of OSMC on my Raspberry Pi 3, I’ve configured all my locale settings in the GUI to be appropriate for the UK. Then, I’ve plugged in a UK keyboard only to find that it’s not treated as a UK keyboard. I can’t even type a backslash.

It boggles the mind that a UK-based developer, after all these years of development of Raspbmc/OSMC, has never tried plugging in a UK keyboard and checking that it just works.

@sam_nazarko Serious question: would you say that you are good at paying attention to detail?