Linux FAQ's & Manuals


canna and japanese pc keyboards


by default, canna uses the romaji-kana conversion table from /var/lib/canna/dic/default.cbp. when using this table, you can enter japanese using the latin transcription. in that case, it doesn't matter much whether you use a japanese keyboard or not because you only need to be able to input latin letters and you can do that with any keyboard layout you like.

but if you have a typical japanese pc keyboard you may want to input the kana characters directly as they are written on the keys.

several alternative romaji-kana conversion tables are available, see /var/lib/canna/dic/*.cbp but none of conversion tables distributed with canna appears to be suitable for the jis x 6002 keyboard layout. which appears to be the most common japanese pc keyboard layout. for more information about japanese keyboard layouts see:

http://euc.jp/i18n/jpkbd.en.html
http://www.pfu.co.jp/hhkeyboard/kb_collection/

and ken lunde's book ``cjkv information processing'', page 245 ff (isbn 1-56592-224-7).

i added a new romaji-kana conversion /var/lib/canna/dic/jisx6002.cbp table to the canna package for suse linux > 8.1 which is suitable for direct kana input with the jis x 6002 keyboard layout

http://www.pfu.co.jp/hhkeyboard/kb_collection/images/win95jp.gif

i.e. if you have such a keyboard and use suse linux > 8.1 it should be enough to set the variable romkana-table in ~/.canna to this new romaji-kana conversion table

     (setq romkana-table "jisx6002.cbp") 

to be able to use the direct kana input.

if you don't yet have a ~/.canna file, you can copy the default one to your home directory first17

     ~$ cp /var/lib/canna/default.canna ~/.canna 

and then edit it.

for suse linux < = 8.1, you can achieve the same effect by creating a suitable custom romaji-kana conversion table in your home directory.

to do that, first download the source of the jis x 6002 keyboard romaji-kana conversion table from here

.canna-jisx6002.ctd

and copy it to to your home directory. compile it to binary form with the command mkromdic .canna-jisx6002.ctd. you'll see output like

     mfabian@gregory:~$ mkromdic .canna-jisx6002.ctd     forcpp -7 < .canna-jisx6002.ctd | /lib/cpp  |forcpp -8 | kpdic  > .canna-jisx6002.cbp     size 603 keys 92     mfabian@gregory:~$ 

now put

     (setq romkana-table ".canna-jisx6002.cbp") 

in your ~/.canna. and restart your canna clients like kinput2, xemacs, etc. to make the change in ~/.canna. effective.



footnotes

... first17
for canna < 3.6 (suse linux < 9.0), this file is at /var/lib/canna/sample/default.canna.
2005-03-09