0

I upgraded to Kubuntu 18.04 recently but do not see the Slovak keyboard layout (in "Keyboard - System Settings Module" ). Is there any way how to add it?

This layout was normally available for older Kubuntu versions.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94

1 Answers1

1

I don't have access to a Kubuntu desktop at the moment, but you can try to add it system wide.

Open the /etc/default/keyboard file for editing. If you for instance have the English (US) layout set by default, you probably find these two lines:

XKBLAYOUT="us"
XKBVARIANT=""

You can add Slovak by changing those lines so they look like this:

XKBLAYOUT="us,sk"
XKBVARIANT=","

Hopefully Slovak will then be available after next reboot.

Edit:

/etc/default/keyboard corresponding to setxkbmap() command in comment:

XKBLAYOUT="us,sk"
BACKSPACE="guess"
XKBVARIANT=",qwerty"
XKBMODEL="pc105"
XKBOPTIONS="grp:alt_shift_toggle"
Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94
  • Thank you Gunnar, modifying that config file helped to me. It did not affect "Keyboard" app list of installed layouts, but that app display correct flag/code for that Slovak keyboard (when I switch from the 'us" to "sk" and back). I investigated further and found this command: – Martin Flaska Aug 18 '18 at 17:08
  • ...

    setxkbmap -model pc105 -layout "us,sk" -variant ",qwerty" -option "grp:alt_shift_toggle"

    at https://www.x.org/releases/X11R7.6/doc/xorg-docs/input/XKB-Config.html

    But that does not work after reboot.

    Using strace for that app I found ${HOME}/.config/kxkbrc which is the config file that app use, so I put LayoutList=us,sk(qwerty).

    – Martin Flaska Aug 18 '18 at 17:22
  • @MartinFlaska: It you want the settings in that setxkbmap() command survive a reboot, then edit the config file accordingly (see edited answer). – Gunnar Hjalmarsson Aug 18 '18 at 17:42
  • I understand, it works, but that do not affect kb layout list which "Keyboard" app (kcmshell5 --args=--tab=layouts kcm_keyboard) shows in settings layout tab. So I was curious why. Anyway, thank you for you help, it pointed my right direction. Still I have no idea why it do not offer Slovak layout out of the box. – Martin Flaska Aug 18 '18 at 17:51
  • @MartinFlaska: Me neither. It's probably some Kubuntu specific issue. – Gunnar Hjalmarsson Aug 18 '18 at 18:04