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

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