zero-el provides zero-input-pinyin, an Emacs pinyin input method for Chinese and zero-input-framework, which is an emacs Chinese input method framework.
https://blog.emacsos.com/zero-el.html
For user configurable variables, see M-x customize-group zero-input M-x customize-group zero-input-pinyin
- Enable zero-input minor mode in emacs buffer.
M-x zero-input-mode
You should bind a global hotkey for this function for easier switch, e.g. (global-set-key (kbd “<f1>”) ‘zero-input-mode)
- Type pinyin string, for example, “zhongwen”, zero will show candidates
matches this pinyin string. You may choose first candidate by space. You may
choose other candidates by digit keys. You may page down, page up by =/-
key.
Some notes on pinyin string,
- There is no ü on US keyboard, type v instead. For example lv 绿.
- Use ’ to separate pinyin substring like xi’an 西安
- Chinese punctuation mapping. Type the char will insert the corresponding
Chinese punctuation when zero-input-punctuation-level is basic or full.
char punctuation basic
, , . 。 ? ? ! ! \ 、 : : full
_ —— < > 《 》 ( ) ( ) [ ] 【 】 ^ …… ” ” “ ” ’ ’ ‘ ’ ~ ~ ; ; $ ¥ ` · (middle dot) You may customize punctuation mapping via zero-input-convert-punctuation-basic and zero-input-punctuation-full-map.
- Auto save user phrases. When you type a new phrase, it will be remembered in user phrase db.
- To delete system phrase or user phrase, type C-<digit> when candidate is shown in zero-panel.
- Auto convert Chinese period to dot for digits and English letter and digit mixed words. For example, to type “3.6” when zero-input-mode is on, type “3.” will insert “3。”, just continue type 6, it will be converted to “3.6”. Same thing for “H。265” -> “H.265”.
Please report bugs at github issues. Note that development (and melpa pkg) still happens on gitlab repo. The github repo is an official mirror to make reporting issue easier.
- see ./ChangeLog
- The change log include change log from all sub projects.
- zero-input is the emacs lisp package that provide user interface for zero input method.
- zero-pinyin-service offers pinyin service such as find candidates and saving user phrases. used by zero-pinyin.
- zero-panel offers gtk panel to show candidates.
- zero-input.el
It’s a generated file for one-file package distribution. Not used for development.
- zero-input-framework.el
zero input framework source code. This provides the framework and user interface for zero-el.
- zero-input-panel.el
dbus client to zero-panel service.
- zero-input-pinyin-service.el
dbus client to zero-pinyin-service.
- zero-input-pinyin.el
Pinyin input method implemented using zero-input-framework.el
- zero-input-quickdial.el
proof of concept of how to create an input method in emacs using minor mode.
- zero-input-reload-all.el
zero-el development utility.
- zero-input-table.el
serves as an example of how to use zero framework to create new input methods.
zero-el is under Apache License 2.0
zero-input–ibus-compute-pixel-position function in zero-input-framework.el is under GPLv3. see NOTICE file.