/usr/share/m17n/zh-util.mim is in m17n-db 1.7.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | ;; zh-util.mim -- Provide utilities for Chinese input methods.
;; Copyright (C) 2005, 2008
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H15PRO112
;; This file is part of the m17n library.
;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.
;; The m17n library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Lesser General Public License for more details.
;; You should have received a copy of the GNU Lesser General Public
;; License along with the m17n library; if not, write to the Free
;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
(input-method t nil zh-util)
(description "Provide utilities for Chinese input methods.
This is acutually not a standalone input method, but is expected
to be included in the other Chinese input method (e.g. zh-py).
")
(map
;; Typing 1, 2, ..., 0 selects the 0th, 1st, ..., 9th candidate.
(choose
("1" (select 0))
("2" (select 1))
("3" (select 2))
("4" (select 3))
("5" (select 4))
("6" (select 5))
("7" (select 6))
("8" (select 7))
("9" (select 8))
("0" (select 9)))
(change-candidate
((Left) (select @-))
((C-b) (select @-))
((Right) (select @+))
((C-f) (select @+))
((Up) (select @\[))
((C-p) (select @\[))
((Down) (select @\]))
((C-n) (select @\])))
(focus-move
;; When an input spot is moved, commit the current predit by shifting
;; to init.
((input-focus-move)))
(focus-change
;; When an input focus is out or in, keep the current preedit.
((input-focus-out) (set KK @@) (sub KK 1) (undo KK))
((input-focus-in) (set KK @@) (sub KK 1) (undo KK)))
(backspace
((BackSpace)))
(commit-preedit
((S-\ ))
((\ ))))
(state
(check-undo
;; When Backspace is typed, cancel the last input.
(backspace (undo))
(focus-move (shift init))
(focus-change)
;; When anything else is typed, produce the current candidate (if
;; any), and re-handle the last input in "init" state.
(nil (hide) (shift init)))
(select
(t (set K @@) (sub K 1))
;; When a number is typed, select the corresponding canidate,
;; produce it, and shift to "init" state.
(focus-move (shift init))
(focus-change)
(choose (hide) (shift init))
(change-candidate)
(backspace (undo K))
;; When key to force committing, commit the current preedit.
(commit-preedit (shift init))
;; When anything else is typed, produce the current candidate,
;; and re-handle the last input in "init" state.
(nil (hide) (shift init))))
|