Japanese input on the command line (framebuffer)


Things to add (it has been a while…):


(at the moment I forgot where I was supposed to place this…)

;; -*- mode: scheme -*-
;; Place this file as ~/.uim.  This file overrides any settings from
;; files in ~/.uim.d/customs

(define default-im-name 'anthy)

(define generic-on-key '("<IgnoreShift><Control>\\"))
(define generic-on-key? (make-key-predicate '("<IgnoreShift><Control>\\")))
(define generic-off-key '("<IgnoreShift><Control>\\"))
(define generic-off-key? (make-key-predicate '("<IgnoreShift><Control>\\")))

(define generic-shrink-key? '("<Control>j"))
(define generic-extend-key? '("<Control>k"))
(define anthy-shrink-segment-key? 'generic-shrink-key?)
(define anthy-extend-segment-key? 'generic-extend-key?)

Run this using uim-fep -u anthy or just uim-fep if you have (define default-im-name 'anthy) in ~/.uim.

Also run uim-pref-gtk to get a graphical settings menu.


I have the following in my ~/.emacs.

(set-fontset-font "fontset-default"
          '("IPAexGothic" . "iso10646-1"))
(prefer-coding-system 'utf-8)

;; This speeds up input?
(if (>= emacs-major-version 23)
    (setq anthy-accept-timeout 1))

Basic usage:

  1. Start emacs using emacs -nw.
  2. Type Ctrl-\ which prompts the user for an input method.
  3. Type japanese-anthy.

2017 update: I am never on the framebuffer these days, but for Japanese input on Emacs I have switched to mozc. The relevant config lines are here.

Packages to install (Debian)