Fixing Japanese Keyboard Layout Dell Inspiron 1420 Ubuntu 8.04
After installing Ubuntu on my Dell laptop, one of the problems encountered was the keyboard. I have an uncommon Japanese keyboard layout since I bought the Inspiron in Japan. But hopefully the info is useful for modifying the keyboard in Ubuntu.
The first thing to do would be to go to System -> Preferences -> Keyboards, and choose the appropiate layout. Also click the Layout Options button and modify the Alt-Win behavior, choose to use the Win key as Super. I needed this to activate some cool Compiz animations comfortably
Then we’re going to need these three utilities: xev, xmodmap, xkeycaps. If you don’t have the xkeycaps, install it by:
sudo apt-get install xkeycaps
Xkeycaps is the GUI for xmodmap, use it first because it’s easy to modify. Just click and click. But you may encounter some keys that are not detected in xkeycaps, thus we must modify it manually through xmodmap. By the way, if you’re looking for the Fn key, it can’t be mapped because it modifies the key value through the BIOS/hardware.
Using xmodmap seemed hard, but turns out it’s not that scary. First, get the keycode of the button you wish to modify through xev. I think it’s self-explanatory. Then, modify the button with xmodmap, using the following syntax:
xmodmap -e “<expression>”
The <expression> field can be filled in with such expressions:
add <modbit> = keyvalue
remove <modbit> = keyvalue
keysym <value> = <another keysym value>
keycode <value> = <keysyms value>
Confused? Hopefully in most cases we won’t need to touch modbit. To map a key, we only need the simple last expression. Remember/note down the keycode-s to be changed. These keycodes are fixed to a certain button.
Now, change the “output” of that button by the keysyms value. Look it up on google, or in here.
In my case, my backslash-underscore button was like a dead button. I couldn’t type an backslash nor underscore, not very nice
This is what I typed in the terminal:
xmodmap -e “keycode 211=backslash underscore”
Easy as that, my “Super” (Win) key now works, and I can type underscores: ___ (Hooray)
PS: You may notice I use the nice Mac4Lin Theme.
Edit:
Complete keysym list:
http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap
PS again: Please see the following link on how to make the changes run on every startup!!
http://ubuntuforums.org/showthread.php?t=325688
It tells you how to put those commands in a file named .xmodmaprc in your home. It will be read everytime you login.

6 Comments
Jump to comment form | comments rss [?] | trackback uri [?]