I know how to use ibus-unikey. However, whenever I switch to Unikey, the keyboard layout is changed automatically to English keyboard layout. this is very inconvenient.

For example, I use Swiss German Keyboard. but when I use unikey, its change to English keyboard so when I type Z it appears Y on the screen.

Would anyone of you kindly advise me on how to use Unikey while still keeping the same German keyboard layout. (in Window machine, this is easily as you can type VNese with Unikey in any keyboard layout).

2 Answers 2


Ubuntu 14.04, I'm using ibus-unikey with my French keyboard. The Solution is to modify the default English keyboard layout (QWERTY) to match my physical French keyboard layout (AZERTY).

Step 1: Modify the file: /usr/share/X11/xkb/symbols/us based on the fr file (in the same folder). The syntax is not hard to guess. I kinda copy the fr layout into it.

Step 2: Apply the change: sudo dpkg-reconfigure xkb-data. So the English keyboard will now got the French layout which matches my physical Keyboard, and ibus-unikey uses the English keyboard (welcome)

Make sure to create a backup of /usr/share/X11/xkb/symbols/us before editing it.

(voilà, I pulled out my hair for 6 hours to come up with this hack)

  • Another solution might be "setxkbmap fr" but I didn't try this one..
    – Hiep
    Jan 11, 2016 at 18:07
  • Have you come up with a better solution in these 5 years, or did you gave up already? :D Sep 5, 2021 at 20:48

Following this guide from Ubuntu-VN, simply replace the contents of the file /usr/share/ibus/component/unikey.xml with the contents of this file.

This defines the Unikey engine to not use "US" keyboard layout, but instead the "default" keyboard layout, which corresponds to the last keyboard layout that was used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.