Typing in Korean on Lubuntu 14.04

UPDATE OCT 2018: in later versions of Lubuntu (I'm using 18.04 now), the default input system when adding Korean language is Fcitx which works well.

In Preferences > Fcitx Configuration you can easily set your right-alt key as the 영/한 key globally. When it asks you to input the key for this, ALT-R may appear but then the box stays active because it expects a key combination; not just one. That's OK. Just close the box with the mouse and ALT-R will remain as the toggle key.

Original post below.

Typing in Korean on Lubuntu

The default input system for Lubuntu is iBus, but I find that iBus rarely works properly for typing in Korean, and if you check the forums, you'll see that especially Asian script users (Japanese, Chinese, Korean...) are having difficulty making it work. Most are switching to alternate input methods.

For me, I got iBus working for Hangul typing, but I had to keep manually switching between English/Korean by clicking with the mouse on the keyboard input icon in the toolbar panel. Not the best option. I have a Korean keyboard and want to use the 한/영 character.

Luckily, and older input method, imhangul, worked great. Here's how I got it working, and I'm very satisfied with the result.

Changing iBus to imhangul

Basically, we will: (1) install Korean language, (2) remove iBus, (3) install im-switch/imhangul, (4) activate hangul

  1. In the Language Support settings, install the Korean language pack. It may even recommend doing so when you open these settings.
  2. Using Synaptic Package Manager, search for and remove all entries relating to iBus. Be sure to "Mark for Complete Removal".
  3. Log out and log in. 
  4. Using Synaptic, install the packages im-switch and imhangul-common , formerly known as simply imhangul. It may warn you that this will remove the Language Support entry, Lubuntu Desktop, etc. Don't worry. Proceed.
  5. Log out and log in.
  6. Open a terminal and enter im-switch. A settings dialog will pop-up asking to choose your input method. Choose imhangul.
  7. Log in and log out
Now, test to make sure that you can type in Korean. The default toggle switch is to press the combination of the shift key and the space bar (shift-space). If you're using an English-language keyboard, you could stop right here.

However, if you're using a Korean-language keyboard, you probably want to use 한/영 character. Or even if you're on an English keyboard, you may find this combination annoying (I continually accidentally switched languages when typing "I"). To do so you'll need to configure the imhangul settings.

Configuring imhangul settings

The solution is simple. We need to create our own config file. Don't worry; it's very easy.

In your home directory ( /home/yourusername ) create a blank text file and name it .imhangul.conf (the initial dot is needed, as the file will be a hidden file, so if you create this and suddenly wonder "Where is the file?" make sure you've enable viewing of hidden files. A simple ctrl-H should toggle it).

Next, paste this text into the document:

enable_status_window = false
hangul_keys = "Hangul", "<Shift>space", "Alt_R"
hanja_keys = "Hangul_Hanja", "F9", "Control_R" 

Now you have a basic config file for imhangul and you can edit it any way you want. Because I don't want the shift+space combination toggling the language input, I just removed the
The "hangul" key is already listed there, so no problem. Save the file. Now log out and log in.


Now I can type in English or switch to Korean by using the 한/영 key on my keyboard, which I just did right there. Look I'll do it again 다시 사용하고 있지 wow that was much faster than clicking.

If you're looking for more advanced options for imhangul, try here.

(Optional) Change your Keyboard Layout

Finally, just in case this still doesn't work (and you're on a Korean keyboard), you might need to change your Keyboard Layout.
  1. Go to Keyboard Layout Handler. You may no longer have this setting in the System Preferences menu (a result of removing the Language Settings), but it should still be there in the taskbar (aka panel). Right-click it and choose Keyboard Layout Handler Settings.
  2. Under the Keyboard Layouts section, click "+Add", scroll down to Korean, expand the arrow to choose "Korean 101/104 key Compatible" and enable it. I also removed the entry for English. Try both methods for toggling the language (shift+space, hangul) and be patient; it took a few seconds while typing for it to kick-in for me. If this doesn't work, try the plain "Korean".
Good luck and happy 한글 typing.