;; cjk-util.mim -- Provide utilities for CJK input methods. ;; Copyright (C) 2005 ;; 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., 59 Temple Place, Suite 330, Boston, MA ;; 02111-1307, USA. (input-method t nil cjk-util) (title "AA") (description "Provide utilities for CJK input methods. This is acutually not a standalone input method, but is expected to be included in the other input method (e.g. zh-py). The fullwidth mode is turned on by typing \">>\", and turned off by typing \"<<\". The single fullwidth mode is turned on by typing \"Z\". In this mode, any key typed is converted to the fullwidth character and is inserted, then the mode is turned off. ") (map (fullwidth (" " ? ) ("!" ?!) ("\"" ?") ("#" ?#) ("$" ?$) ("%" ?%) ("&" ?&) ("'" ?') ("(" ?\() (")" ?\)) ("*" ?*) ("+" ?+) ("," ?,) ("-" ?-) ("." ?.) ("/" ?/) ("0" ?0) ("1" ?1) ("2" ?2) ("3" ?3) ("4" ?4) ("5" ?5) ("6" ?6) ("7" ?7) ("8" ?8) ("9" ?9) (":" ?:) (";" ?;) ("<" ?<) ("=" ?=) (">" ?>) ("?" ??) ("@" ?@) ("A" ?A) ("B" ?B) ("C" ?C) ("D" ?D) ("E" ?E) ("F" ?F) ("G" ?G) ("H" ?H) ("I" ?I) ("J" ?J) ("K" ?K) ("L" ?L) ("M" ?M) ("N" ?N) ("O" ?O) ("P" ?P) ("Q" ?Q) ("R" ?R) ("S" ?S) ("T" ?T) ("U" ?U) ("V" ?V) ("W" ?W) ("X" ?X) ("Y" ?Y) ("Z" ?Z) ("[" ?\[) ("\\" ?\) ("]" ?\]) ("^" ?^) ("_" ?_) ("`" ?`) ("a" ?a) ("b" ?b) ("c" ?c) ("d" ?d) ("e" ?e) ("f" ?f) ("g" ?g) ("h" ?h) ("i" ?i) ("j" ?j) ("k" ?k) ("l" ?l) ("m" ?m) ("n" ?n) ("o" ?o) ("p" ?p) ("q" ?q) ("r" ?r) ("s" ?s) ("t" ?t) ("u" ?u) ("v" ?v) ("w" ?w) ("x" ?x) ("y" ?y) ("z" ?z) ("{" ?\{) ("|" ?|) ("}" ?\}) ("~" ?~) ((cent) ?¢) ((sterling) ?£) ((notsign) ?¬) ((brokenbar) ?¦) ((yen) ?¥) ((Korean_Won) ?₩)) (enter-fullwidth-mode (">>" (shift fullwidth-mode))) (exit-fullwidth-mode ("<<" (shift t))) (enter-single-fullwidth-mode ("Z" (shift single-fullwidth-mode))) ;; 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 @])))) (state (init "A" (enter-fullwidth-mode) (enter-single-fullwidth-mode)) (fullwidth-mode "A" (fullwidth (commit)) (exit-fullwidth-mode) (nil (unhandle))) (single-fullwidth-mode "A" (fullwidth (commit) (shift t)))) ;; Local Variables: ;; mode: lisp ;; coding: utf-8 ;; End: