NSKK is a modern, zero-dependency Japanese input method for Emacs built on SKK (Simple Kana to Kanji) principles. It delivers:
- Clean architecture — 7-layer modular design with full lexical-binding
- DDSKK compatibility — Familiar keybindings and behavior
- Extensible — Embedded Prolog engine for customizable conversion logic
NSKK = Next-generation SKK = 次世代 SKK
Only Emacs 29.1+ built-in packages:
- cl-lib (Emacs 24.3+)
- subr-x (Emacs 24.4+)
No external ELPA packages required.
| Component | Description |
|---|---|
| Lexical binding | All 25 modules use lexical-binding: t |
| Prolog engine | Conversion rules as facts/queries |
| Layer separation | 7 strict layers, zero circular deps |
| Test coverage | 5,000+ unit/integration/E2E tests |
- Same keybindings (
C-j,SPC,x,q,l, etc.) - Same mode indicators (かな, カナ, SKK, 全英, aA)
- Same dictionary format (SKK-JISYO)
- Same conversion markers (▽ for preedit, ▼ for conversion)
(use-package nskk
:vc (:url "https://github.com/takeokunn/nskk.el" :rev :newest
:lisp-dir "src")
:custom
(nskk-dict-system-dictionary-files
'("/usr/share/skk/SKK-JISYO.L"))
:config
(nskk-global-mode 1))(require 'nskk)
(nskk-global-mode 1)
;; NSKK uses Emacs's built-in ja-dic by default when available.
;; You can still override it with `nskk-dict-system-dictionary-files'.
;; After nskk-global-mode is enabled:
;; C-j → switch to hiragana input (from ascii mode)
;; C-x C-j → toggle nskk-mode on/off in current buffer;; Debian/Ubuntu: apt install skktools
;; macOS: brew install skk-jisyo
;; NixOS: environment.systemPackages = [ skk-jisyo ];
(setopt nskk-dict-system-dictionary-files
'("/usr/share/skk/SKK-JISYO.L"
"/usr/share/skk/SKK-JISYO.jinmei"
"/usr/share/skk/SKK-JISYO.geo"))
(nskk-global-mode 1)(use-package nskk
:vc (:url "https://github.com/takeokunn/nskk.el" :rev :newest
:lisp-dir "src")
:custom
;; Start in hiragana mode (optional, default is ascii)
(nskk-state-default-mode 'hiragana)
;; System dictionaries
(nskk-dict-system-dictionary-files
'("/usr/share/skk/SKK-JISYO.L"))
;; User dictionary location
(nskk-dict-user-dictionary-file "~/.nskk/jisyo")
;; Show candidate list after 2nd SPC (default: 5)
(nskk-henkan-show-candidates-nth 2)
;; Enable dictionary caching
(nskk-dict-cache-enabled t)
;; AZIK romaji style (optional)
;; (nskk-converter-romaji-style 'azik)
:config
(nskk-global-mode 1))| From | Key | To | Indicator |
|---|---|---|---|
| Any | C-x C-j | Toggle on/off | — |
| ascii | C-j | hiragana | かな |
| hiragana | q | katakana | カナ |
| hiragana | l | ascii | SKK |
| hiragana | L | full-width | 全英 |
| hiragana | / | abbrev | aA |
stateDiagram-v2
[*] --> ASCII: nskk-global-mode (default)
ASCII --> Hiragana: C-j
Hiragana --> ASCII: l
Hiragana --> Katakana: q
Hiragana --> FullWidth: L
Hiragana --> Abbrev: slash
Abbrev --> Conversion: SPC
Abbrev --> Hiragana: C-j / C-g
Katakana --> Hiragana: q
Katakana --> Hiragana: C-j
Katakana --> ASCII: l
FullWidth --> Hiragana: C-j
Hiragana --> Preedit: Uppercase
Katakana --> Preedit: Uppercase
Preedit --> Conversion: SPC
Preedit --> Hiragana: C-g (returns to kana mode)
Conversion --> Hiragana: C-j (commit, returns to kana mode)
Conversion --> Conversion: SPC (next)
Conversion --> Conversion: x (prev)
Conversion --> Preedit: C-g (rollback)
| Key | Command | Description |
|---|---|---|
C-x C-j | nskk-toggle-mode | Toggle NSKK in current buffer |
C-j | nskk-kakutei | Commit (hiragana) / enter hiragana (ascii) / newline |
q | nskk-handle-q | Toggle hiragana ↔ katakana |
l | nskk-handle-l | Switch to ASCII mode |
L | nskk-handle-upper-l | Switch to full-width latin (JIS X 0208) |
/ | nskk-handle-slash | Enter abbrev mode |
| Key | Command | Description |
|---|---|---|
SPC | nskk-handle-space | Start conversion / next candidate |
x | nskk-handle-x | Previous candidate |
X | nskk-handle-upper-x | Purge candidate from user dictionary |
RET | nskk-handle-return | Commit candidate + newline |
C-g | nskk-handle-cancel | Cancel conversion or preedit |
a=–=l | direct select | Select candidate in list mode |
C-n | nskk-handle-ctrl-n | Next candidate OR next line |
C-p | nskk-handle-ctrl-p | Prev candidate OR previous line |
C-/ | nskk-undo-kakutei | Undo last kakutei (revert commit) |
| Key | Behavior |
|---|---|
↑ / C-p | Commit candidate + move to previous line |
↓ / C-n | Commit candidate + move to next line |
← / C-b | Commit candidate + move backward |
→ / C-f | Commit candidate + move forward |
| Key | Behavior |
|---|---|
C-a / <home> | Commit candidate (if converting) / go to beginning of line |
C-e / <end> | Commit candidate (if converting) / go to end of line |
| Key | Command | Description |
|---|---|---|
DEL | nskk-handle-backspace | Delete last preedit char / cancel conversion |
TAB | nskk-handle-tab | Dynamic completion (preedit) / indent-for-tab-command |
| Mode | Indicator | Description |
|---|---|---|
ascii | SKK | Direct ASCII input (pass-through) |
hiragana | かな | Hiragana input |
katakana | カナ | Katakana input |
jisx0208-latin | 全英 | Full-width latin (JIS X 0208) |
abbrev | aA | Abbreviation expansion |
;; Set initial input mode
(setopt nskk-state-default-mode 'hiragana)
;; System dictionary files
(setopt nskk-dict-system-dictionary-files
'("/usr/share/skk/SKK-JISYO.L"))
;; User dictionary location
(setopt nskk-dict-user-dictionary-file "~/.nskk/jisyo")
;; Candidate display
(setopt nskk-henkan-show-candidates-nth 2)
(setopt nskk-henkan-number-to-display-candidates 7);; Connect to a running skkserv for extended dictionary lookup
(setopt nskk-server-enable t)
(setopt nskk-server-host "localhost")
(setopt nskk-server-portnum 1178);; Run when NSKK is disabled
(add-hook 'nskk-mode-off-hook
(lambda () (message "NSKK deactivated")));; Enable AZIK for more efficient romaji input
(setopt nskk-converter-romaji-style 'azik)
;; Keyboard layout (us101 or jp106, default: us101)
(setopt nskk-azik-keyboard-type 'jp106)AZIK replaces standard romaji with efficiency shortcuts:
f→ ん hatsuon (e.g.kf→ かん)j→ ん hatsuon (e.g.sj→ さん)- Double consonant suffixes → double vowels (e.g.
kk→ きん,sh→ すう)
All optional features are auto-loaded when NSKK starts if their modules are present.
| Feature | Module | Enable with |
|---|---|---|
| Annotation display | nskk-annotation | (setopt nskk-show-annotation t) |
| Inline mode display | nskk-show-mode | (setopt nskk-show-mode-show t) |
| Dynamic dcomp multi | nskk-inline | (setopt nskk-dcomp-multiple-activate t) |
| Context auto-mode | nskk-context | (nskk-context-global-mode 1) |
| Isearch integration | nskk-isearch | (setopt nskk-isearch-enable t) |
| Region operations | nskk-region | Available as M-x nskk-region-* commands |
M-x customize-group RET nskk RET
git clone https://github.com/takeokunn/nskk.el.git
cd nskk.el
# Using Nix (recommended)
nix develop
# Or without Nix (requires Emacs 29.1+)
make compile
make testThe project includes
flake.nixfor reproducible development environments.nix developprovides Emacs 29.1+ with all necessary dependencies preconfigured.
| Command | Description |
|---|---|
make compile | Byte-compile all modules |
make test | Run all tests |
make test-unit | Run unit tests only |
make test-integration | Run integration tests only |
make test-e2e | Run end-to-end tests only |
make lint | Run checkdoc |
make clean | Remove *.elc files |
See CHANGELOG.md.
- Fork and create a feature branch
- Add tests and ensure they pass (
make test) - Commit and create a pull request
nskk-prefix for public symbolsnskk--prefix for internal symbols- All files must have
lexical-binding: t
Copyright (C) 2026 NSKK Contributors
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- DDSKK — A long-standing and widely used SKK implementation for Emacs
- All SKK dictionary contributors