Japanese input on the command line (framebuffer)

Upshot

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

uim-fep

(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.

Emacs

I have the following in my ~/.emacs.

(set-fontset-font "fontset-default"
          'japanese-jisx0208
          '("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.

Packages to install (Debian)


CC0
The content on this page is in the public domain.