Typing Japanese with Dvorak keyboard

From StackOverflow

I did this for chinese. I just did it for japanese as well. Heres what you do:

Using the following link by Michael Kaplan, please read it before you change your continue.

http://superuser.com/questions/38781/how-can-i-use-the-chinese-ime-with-a-dvorak-layout

Start > Run > type regedit > press enter (registry editor will open)

Expand HKEY_LOCAL_MACHINE > Expand SYSTEM > Expand CurrentControlSet > Expand Control > Expand Keyboard Layouts > Select E0010411(japanese IME) > Export a copy for backup > Double-click Layout file > type kbddv.dll in the value data box.

You may need to restart your computer. note that E0010411 is for japanese, E00E0804 is for chinese.

Good luck!

Life with Ubuntu

First, Happy new year to you and your family 🙂

I have been using Linux on a daily basis for several months now and so far life is quite comfortable. For the first time I can simply forget what people have been telling me  since day one –  “you always need antivirus protection”. Heh, how the hell viruses is gonna infect my computer when even I myself can’t modify the system files! Yes, it’s true that if enough people use it there will be some folks spend time to carve into each input box in the whole operating system to find exploits but considering the rate of Firefox adoption over IE, I’d say it may took decades before Linux can take over. This world is resistant to changes, even if it’s good.

Though the default Ubuntu distribution works out of the box and satisfy the needs of most user, it’s oriented to the naive, who doesn’t have the need for more complex configurations, say – multilingual inputs. That’s when Google comes in handy but it may take a while and some searching skills to find what you need. There’s many question and answer in the Ubuntu forums but they are not always anwered satisfactorily.

Below is a collection of what I have to Google for the past months.

Japanese input

I posted about Japanese on Windows back from last year but I don’t really need Japanese for Linux until now – when my HDD is somewhere in the middle of snowstorms in America and I’m working on a little USB flash drive. It kinda feels like a netbook except it’s faster 😛

Windows doesn’t differentiate between input language and keyboard layout –  it combines both into the IME environment. The result is hideous registry settings to configure what should be readily available. It’s a different thing on Kubuntu: the keyboard layout you can configure in System Settings > Regional & Language > Keyboard Layout is for your physical keyboard only, which means if tells the operating system if there’s something special about your keyboard, like is it laid out in Dvorak, does it have extra function keys, does it have the Japanese switch button etc. To input languages you have to use the input method (IME) which is what translates what you type on the keyboard to something else according to configuration. For example, the Vietnamese input method translates Tie61ng Viet65 into “Tiếng Việt” and the Japanese input method translate katakana into “カタカナ”. All this happens within an input framework. To put it simple, an input framework is a tool that let you switch between languages (This is not technically correct but you’ll know better when you have become familiar with it). Being an operating system of choices, there’s three framework for you to choose on Linux: UIM, SCIM and iBus with iBus being the future.

To install iBus, first add the following line to /etc/apt/sources.list

deb http://ppa.launchpad.net/ibus-dev/ibus-1.2-karmic/ubuntu karmic main #IBus 1.2 for Karmic

Then run

sudo apt-get install ibus ibus-gtk

Once iBus has been installed, you can install input languages, say Vietnamese and Japanese:

sudo apt-get install ibus-unikey ibus-anthy

You can activate iBus with

im-switch -s ibus

It requires a restart and then you are good to go! 🙂 Note that instead of using the command line apt-get, you can type “ibus” into the software installer to find the packages and install them.

You can see the language you want to type is not bound to any specific keyboard layout here – at the start of this post you can have Qwerty, Dvorak or Colemak – that doesn’t matter, you can use it to input the language you have installed!

References: ibus @ ubuntu vn, ibus project

Multilingual input with Opera 10

Opera is a great browser, many of the functionality that defines the modern browser is from opera – say tabbed browsing, integrated search function, modular design and many others. Should Opera be free from the start it could have overthrown IE as the most popular browser. Well, what’s history is history already 🙂

I use Opera on linux for the sake of simplicity – it provides all the functions I need without the need to install any fancy plugin (I’m talking about you, Firefox). It’s a surprise that I can’t use iBus to type Vietnamese in Opera when I first installed it :(.

I found out why: the default version you can download from Opera’s homepage is compiled with the Qt3 library while iBus works with Qt4 only. Luckily Opera is also compiled with Qt4 but you’ll need to cruise around some FTP servers to get it.  Click here to get version 10.10 for ubuntu/x86, which is the latest at the time of writing.

When 128MB isn’t enough or how to expand your Ubuntu installation on a USB stick

Kubuntu 9.10 comes with a new feature: make a USB stick bootable and persists your changes between sessions. At first you may think the default storage space of 128 MB could be enough but after some themes, customizations and application s (namely Firefox); 128MB is used up in no time.

Your Linux home is stored within an image file in the root of the drive – casper-rw. You can allow Linux to use a bigger share of your stick by expanding the file then imposes ext3 formatting on it with the following steps:

# dd if=/dev/zero bs=1M count=1024 >> casper-rw
# e2fsck -f casper-rw
# resize2fs -f casper-rw
# e2fsck -f casper-rw

1024 means 1024MB, change this to whatever size you want. Note that this capacity is added to your existing quota, so if you have 128MB already then after this command you have 1153MB for storage.

File managing – Norton Commander style

While Kubuntu have dolphin as a pretty good file manager, iallowsng you to split windows and drag the navigation dock around, it’s still get nowhere close the original NC feel (say tabbing, F3, F4 and F5). Of course Midnight Commander have been around since Linux was still stuck in the server rooms but what? A text mode program on the all cute KDE Oxygen? Does not sound right to me.

Good thing that there’s Krusader. It’s a bit old but seems to work fine. The menu bar, button bar and command line stays true to the tradition – I feel like home 🙂

Dvorak 日本語

While most of the stuff I type everyday can be expressed using Latin characters (e.g English and Vietnamese) so I can use Dvorak for them without the need for another keyboard layout. But sometimes I just need to type in a different kind of language, like, what’s the latest くるま model from トヨタ? 😛

The most convenient way to type that in windows is to use the Japanese IME, but the funny part turning on the IME after my Dvorak conversion is I HAVE TO USE QWERTY FOR JAPANESE. It’s easy to say, but it took me 5 friggin’ minutes to figure out why all I can type is あああ 😐

It’s just what happen when you use Windows: every basic function works just fine, but when you want to take it to the next level of customization, something bad happens.

Luckily, I don’t have to abandon my newly learned layout (which I’m getting a better accuracy rate than the old). There’s three ways to do that

Remap your system’s layout

This site show you how and have a nice chart. I found this site first on my search but this have a lot a side effects: First, you have to change your layout back to qwerty and then remap, which could create confusion when you are protecting your user account with passwords (there’s no way you can tell which keyboard layout is in use at the windows logon prompt – a fatal flaw in design I say). Second, this setting is effective system wide, which means non – Dvorak users will never have the chance to share that computer with you.

Remap the IME

Open the MS-IME’s Properties and press the advanced button, you’ll see a mapping table you can edit, just type the Dvorak combination in place of the qwerty ones already there and you can type Japanese, but what happen if you want one or two Romani character in between? This won’t work 😐

There’s nothing a hack won’t fix

There’s a setting in the registry that will let you change the keyboard mapping file for a specific IME and it’s buried in

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layouts

There you will find a bunch of hexadecimal keys, each correspond to a specific IME: Slovak, US, Dvorak, Japanese, Korean… you name it! The code for Japanese (MS-IME 2002) is E0010411, go there and change the value of “LayoutFile” from kbdjpn.dll (actually a qwerty map) to kbddv.dll (Dvorak map) and restart your computer (This is the only way to restart the IME).

If that didn’t work (Microsoft may as well hiding some other option which will override what you have just overridden somewhere else, oh well…), you may need to go to %systemroot%system32 and copy the kbddv.dll over kbdjpn.dll itself, then restart.

Yup, that’s what I did to get what I wanted – type 日本語 with ドヴォラック :P.