[BUG REPORT] Danish Hardware Keyboard layout not working

Hey All, i’ve got an issue that is driving me nuts! I’ve used Raspbmc on my Raspberry Pi 1 for ages and now i’m switching both my Pi 1 and 2 on to OSMC and every thing except change the keyboard layout for my physical keyboard works, locales is setup properly. I’m Danish so i need the ÆØÅ characters and my symbols on the correct keys, but i’ve been trying ever single command i’ve been able to get from google.

Running
osmc@osmc:~$ sudo dpkg-reconfigure keyboard-configuration
dpkg-query: package ‘keyboard-configuration’ is not installed and no information is available
When i’m trying to find some info on how to get it installed so i can run it, my search result turns up empty.

Then i found some one stating that i had to run setupcon but that didn’t work, again not installed.

All this is on a fresh install of OSMC not changes what so ever and it’s the same on both Raspberry Pi 1 and 2.
Can some one do a quick and dirty guide on how to do this on the latest version of OSMC that you can download.

Thank you very much!

So after fiddeling around i got keyboard-configuration installed and ran it without any errors. but still no luck.
I really hope some one here can tell me how to fix this as it’s getting to me that the console works with correct keys and characters for my language, but the KODI part of OSMC is stuck at default english keyboard for physical keyboard, and there fore utterly useless as all my keyboards are danish and character like - " / : ; is not in the correct location…

Hang on,

So you have the correct keyboard layout at a console login now, but not in Kodi ?

Did you go into Kodi’s International settings and choose your language and keyboard layout there ?

Settings->Appearance->International, you have Language, Region, Character Set, Keyboard layouts and Timezone country and timezone all available.

Timezone is shared between Kodi and local console but the other settings are independent between console and Kodi.

BTW we leave the keyboard-configuration package out by default because it interferes with the splash screen and slows boot quite significantly for something that 90% of users will never use. (Local console login with a non US keyboard layout - you don’t need keyboard-configuration for Kodi keyboard layouts)

Unfortunately there is no easy way for us to include just the keyboard layout parts of keyboard-configuration without it trying to set console fonts (thus wiping the splash screen) and adding various startup services that we don’t want or need, hence leaving it out by default.

Yep, i got the correct layout in console and it shows ÆØÅ and symbols typed corrospond to my keyboards physical layout.

International setting are all set
Lanugage: English (Tried danish but it had no influince at all and i like english interface)
Region: Central Europe
Character Set: Central Europe (Windows)
Keyboard layouts: Danish QWERTY
Timezone country: Denmark
Timezone: Europe/Denmark

Havent had any visual splascreen issues, it’s still the OSMC blue picture.

As i said, the virtual on-screen keyboard is fine and shows ÆØÅ, it’s when i try and add a source or search something and use my physical IRL keyboard plugged in via USB, thats where it’s messed up and is using english layout. This wasn’t an issue in raspbmc after you ran the keyboard-configuration and choose the correct layout, thats why im so frustrated.

You can have multiple keyboard layouts selected in Kodi, and apparently it will always use the first one sorted alphabetically:

http://forum.kodi.tv/showthread.php?tid=211749

What skin are you using ? I have noticed that some skins do not show the highlight when enabling/disabling multiple keyboard layouts - can you try switching to confluence then go into the keyboard layouts and make sure you only have the ONE layout selected ?

When I try this with Danish QWERTY it seems to work - at least I notice that a lot of keys are remapped like those on the button next to left shift, next to 1 etc. As I don’t have a physical Danish keyboard I don’t know if all are correct however.

Thats the theme i already use :smile:
and I already made sure it’s the only one that’s selected. and it’s still the same issue. I’m going to do a complete reinstall of OSMC on both the Pi 1 and 2 and then follow the config that pop up and then switch to the correct theme and then change international settings.

can you please post the settings you use where the keyboard layout is what you think is danish?

Alright so I did a complete reinstall of my raspberry pi 1.
at first boot i choose english in the guide that pops up
then change theme to confluence
changed international settings to this

Language: English
Region: Central Europe
Character Set: Default
Keyboard layouts: Danish QWERTY
Timezone country: Denmark
Timezone: Europe/Denmark

since that resulted in virtual keyboard being danish and physical being english I then changed it to

Language: English
Region: Central Europe
Character Set: Central Europe (Windows)
Keyboard layouts: Danish QWERTY
Timezone country: Denmark
Timezone: Europe/Denmark

This gave the same result so i changed it to this

Language: Danish
Region not available
Character Set: Central Europe (Windows)
Keyboard layouts: Danish QWERTY
Timezone country: Denmark
Timezone: Europe/Denmark

This gave the exact same result. Virtual keyboard being danish and physical being english.

The version of OSMC is the latest as i just downloaded it from the website (for both Pi versions).
I haven’t changed anything else than what i described

If any one else want to test the danish layout should be like this

Is there a config file somewhere i can check if it’s set correctly via SSH?

Screenshot of your keyboard (Kodi) please.

Failing to see the point but here you go.

As i’ve stated a few times it’s not this virtual keyboard that’s the issue but the interpreted layout of the physical keyboard, which is a Danish keyboard interpreted as an English keyboard. Or are you seeing a connection between settings that i dont? :smiley:

Sorry, got confused myself and thought it was the virtual keyboard giving you problems.

It’s alright HitcherUK :smile:
I just really hope some one can help or a dev can try and see if they can replicate the issue so we can find a solution for it .

Would be nice to know if the devs are going to look into this (as it did work on raspbmc) or i just have to find another way to use KODI :smile:

Now I’ve tested both RC1 and RC2 on Pi 1 and Pi 2 and it’s the same issue, no dice on Danish physical keyboard layout.

The problem is all the main devs are only English speaking, so it’s very hard for us to test this issue when we don’t know the language, don’t have a suitable keyboard to test with, and are not used to having to deal with configuring keyboard layouts on a day to day basis… (for us, keyboards “just work”)

Someone Danish speaking with good technical Linux knowledge really needs to step up here and help out…

Is there a file i can check via ssh? My logic and from what I’ve learned from working a bit with linux distros is that there is a file that defines the keyboard layout for kodi some where that i should be able to manually change either via nano or vi or any of the other editors

Keyboard layout and internationalisation in Linux is a bit of a convoluted mess unfortunately.

There are quite a number of different packages and configuration files involved, and they vary from distribution to distribution as well.

OSMC is based on Debian Jessie so I would look for information on how to customise keyboard layouts for Debian Jessie, (or Debian in general, as it probably hasn’t changed much recently) and see what you can find.

Most likely we are just missing some key package - with a full blown installation of Debian, keyboard layout configuration probably “just works”, but in OSMC we have pared the installed packages back to the bare minimum, and may be missing a package required for proper keyboard localisation.

In fact I know we deliberately leave out keyboard-configuration (which is needed for keyboard layouts at the console) as described earlier, but you are saying even with that package installed it still doesn’t work, so there must be something else missing as well, but we don’t know what.

i just tried another language that i knew differed from danish and english in keyboard layout and it’s the same issue. It still only see it as english, so when you stated before that when you changed the keyboard to danish that your physical layout also changed you must have that missing package installed? Then you should be able to create a list of installed packages on the system where you can change layout and then create a list from a clean installed system and then spot the difference? ofc. excluding packages that have nothing to do with configuration of system settings.

Aright so for the past hour or so i’ve been looking into how KODI is run and gui and all that and for me it seems like you use X11 as gui to launch KODI?
And if that is correct this issue might be that there simply is an issue with the GUI keyboard layout. But when i try run this from ssh:
sudo apt-get update
sudo apt-get upgrade
sudo dpkg-reconfigure locales
sudo apt-get install keyboard-configuration
sudo dpkg-reconfigure keyboard-configuration
sudo apt-get install console-data
sudo dpkg-reconfigure console-data
sudo reboot
sudo setxkbmap da

it simply says that the command setxkbmap isn’t found. Am I completely off the track here and looking in the wrong direction?

Kodi doesn’t use X11 and OSMC doesn’t have X11 installed at all, so no, you won’t find setxkbmap.

So there is only the console keyboard layout and the Kodi keyboard layout, and to be honest I’m not sure whether the two are linked in any way or not, I was under the impression that the console keyboard layout (local login when you quit kodi and log in at the console) was completely independent from the Keyboard layout in Kodi, but maybe I am wrong about that.

Your keyboard layout is wrong at a local console as well as within Kodi, right ?

When i try and exit it just show the OSMC splash screen and then i’m back at OSMC GUI, any tips on how to switch to the console as i’ve only ever used GUI or SSH never the internal console