Last edit

Summary: Mention eim.


> * Chinese: EimForChinese

Input Methods allow you to enter characters that are not supported by your keyboard.

Emacs should also work correctly with appropriate XIM input methods under X.

Possibly the most convenient casual method for inputting unicode characters is the TeXInputMethod, which permits you to enter Unicode characters by typing a \ prefixed sequence reminiscent of TeX. For example, the greek character λ may be entered by typing \lambda.

An obsolete way of entering accented characters is iso-accents-mode. These days, you should use the input-method ‘latin-1-prefix’ instead. Both will make accent characters combine with the following characters, so that you can type `” u’ to achieve `ü’, for example.

An even stranger way of entering accented characters is the C-x 8 keymap. See WritingIsoLatinOne.

Another way is to use QuotedInsert with ‘C-q’.

To activate the input method for a specific mode put the following line in your config file:

   (add-hook 'text-mode-hook 'toggle-input-method)

The input method is then automaticaly activated for files which open in text mode.

To activate the input method on a per-buffer basis. First put the following lines in the .emacs:

  (set input-activate nil)
  (add-hook 'find-file-hook
            (lambda ()(if (eq input-activate t) (toggle-input-method))))

Then put the following line at the beginning of a file:

  -*- input-activate: t -*-

The input method will be activated for this file as soon as it is loaded.

These are some additional input methods that do not come with Emacs:

It’s convenient for people who speak in korean or japanese or etc… to use only the internal emacs input method (mule) without scim, nabi, Microsoft IME, etc…

For X Windows, add the following line to your ~/.Xresources file (if not exist, make it)

  Emacs.useXIM: off

For MS Windows, you may need to use DisableImeForEmacs.

Question: Is there a way to synchronize OS keyboard layout (ubuntu in my case) with Emacs input method?

It is not convenient to use different bindings for switching languages inside and outside of Emacs…

Question: How do I allow input methods such as SCIM to override Emacs keybindings in a desktop environment such as GNOME (instead of using the version of SCIM internal to Emacs)?

Set LC_CTYPE=ja_JP.UTF-8 before launching Emacs, and Emacs will recognize your SCIM keys, such as C-SPC to change input method.

See Also: ChangingCursorDynamically to automatically change the TextCursor color when you are using an input method. This makes it easy to tell if an input method is in use.