Skip to content

Instantly share code, notes, and snippets.

@akirak
Last active May 30, 2021 17:41
Show Gist options
  • Save akirak/e93876855f8b1d295c2cd0ff2370af8d to your computer and use it in GitHub Desktop.
Save akirak/e93876855f8b1d295c2cd0ff2370af8d to your computer and use it in GitHub Desktop.
How to use DDSKK, Japanese input method for Emacs

How to Use DDSKK Japanese Input Method for Emacs

This tutorial describes the basic usage of DDSKK Japanese input method for Emacs.

Installation and configuration

Install ddskk package.

Turn on skk-mode minor mode to write Japanese. It is recommended that you should bind a key to this command:

(global-set-key (kbd "C-x C-j") 'skk-mode)

Installation of SKK-JISYO.L (large dictionary)

You have to install at least one dictionary to translate Hiragana to Kanji. SKK-JISYO.L (L stands for large) contains a lot of words, so it will be a good starting point:

(setq skk-large-jisyo "/usr/share/skk/SKK-JISYO.L")

Usage

In skk-mode, hiragana is inserted by default as you type alphabets.

Translating to Kanji

You can enter kanji using one of the following ways:

  • To enter a word consisting only of kanji, begin the word with a capital letter and enter space after the word.
  • To enter kanji followed by 送り仮名/okurigana (hiragana) such as 行く and 難しい, begin the okurigana with a capital letter.

During candidate selection, use SPC to select the next candidate and x to the previous one.

If there is no candidate found in any of your dictionaries, DDSKK opens the minibuffer to register a new word to your dictionary. You have to re-enter words by breaking down your input to smaller pieces of the language.

See the following examples:

WordHiraganaAlphabets to type
変換中へんかんちゅうHenkan (select) Tyuu (select)
難しいむずかしいMuzukaSi (select) i
行きますいきますIKi (select) masu

Switching to other modes

You can switch to other modes with the following keys:

KeyMode action
qToggle between hiragana and katakana modes
lSwitch to ASCII mode (inserting alphabets literally)
LSwitch to a mode for inserting double-width alphabets
C-jSwitch back to hiragana mode from alphabet modes

References

@crocket
Copy link

crocket commented Mar 5, 2020

Is this better than mozc.el? I have to use a japanese input method with evil-mode. It seems skk comes with a more recent conversion.

@akirak
Copy link
Author

akirak commented Mar 5, 2020

They are different methods, so it is hard to tell which is better.

I am using mozc.el now, but I am unsatisfied with it. Perhaps you can type faster in ddskk, if you get used to it and maintain your dictionaries up to date. I don't care anyway, because I don't write Japanese in Emacs frequently now. I use mozc.el mostly for writing Japanese comments in source code. I was tired of being asked by ddskk whether I want to save its dictionary (note: this can be prevented by running a dictionary server), so I've chose a way which requires less maintenance. Perhaps you can ask other Japanese hackers using Emacs.

@crocket
Copy link

crocket commented Mar 5, 2020

Does mozc allow you to add words to its own dictionary? By the way, I cannot write 行く with ddskk.

@akirak
Copy link
Author

akirak commented Mar 5, 2020

I don't know, but I don't care. I use it only for code comments at work. I sometimes want to translate Japanese to other languages, and this package may help with it (but I'm not using it now): https://github.com/akirak/katawa.el

@akirak
Copy link
Author

akirak commented Mar 5, 2020

By the way, I cannot write 行く with ddskk.

If you cannot write it by IKu, then you haven't set up a dictionary.

@crocket
Copy link

crocket commented Mar 5, 2020

IKu inputs 行く. It seems skk is somewhat difficult to learn.

@akirak
Copy link
Author

akirak commented Mar 5, 2020

That's one of the reasons I stopped using it. It's different from other typical Japanese input methods.

@crocket
Copy link

crocket commented Mar 5, 2020

mozc is very easy to use on emacs. I also replaced anthy with mozc in fcitx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment