[BUG REPORT] Danish Hardware Keyboard layout not working

Sorry for necroposting, but this is still an issue, and I find this to be the best and most logical place to provide a solution.
After over 3 days of trying and failing to fix this problem I have finally found a solution that worked for me. Before this, I had already tried to use every solution I could find on the wide web. To clarify:

Setup: ASUS laptop X73TA with Kodi 16.1 (Jarvis) with Kodibuntu running on Ubuntu 14.04.

Problem: Virtual keyboard and terminal works fine with my Norwegian keyboard, and provides correct output. Inside Kodi however, my keyboard acts as a US-keyboard.

Solutions tried: “setxkbmap” (works in desktop-/Lubuntu-mode, but not in Kodi), “dpkg-reconfigure locals”, “dpkg-reconfigure console-data”, “dpkg-reconfigure keyboard-configuration” and every combination of settings with regards to language, locale, keyboard layout, and the like.


Solution: “loadkeys”. To solve this, I had to use the loadkeys command from the terminal in Kodi-mode (not in Lubuntu). You can enter this by pressing CTRL+ALT+F1-6 (CTRL+ALT+F7 to get back to Kodi).

For a one-time fix:

  1. Enter terminal in Kodi-mode (explained above).
  2. Enter command sudo loadkeys no (replace “no” with your relevant layout, eg. de-latin1 for German or dk-latin1 for Danish).
  3. Should give output like Loading /usr/share/keymaps/i386/qwerty/no.kmap.gz, or something similar.

For a permanent fix (runs on startup):

  1. Enter terminal (I think you can do this from Lubuntu as well, but I do not know).
  2. Edit “/etc/rc.local” to run this command on startup: loadkeys no-latin1 (or use any other method to get a shell command to run on startup, eg. systemd or init.d, depending on your system).
  3. Reboot the system, and your keyboard layout should be changed!

I hope this works for others than me. I give no guarantees that this solution will work for you, but at least it did for me, so I hope it does for you too!

NB: Sometimes, it seems you need to input “no-latin1”, while other times “no” does the trick. I do not know why.