70
|
1 ;; Basic translation table to input KANA with ASCII keyboard
|
|
2 ;; Created by DEMIZU Norotishi <nori-d@is.aist-nara.ac.jp> on 1994.1.26
|
|
3 ;; !Id: kanainput.el,v 1.2 1994/02/04 13:19:38 nori-d Exp nori-d !
|
|
4
|
|
5 ;;
|
|
6 ;; $BG[I[>r7o$O(B GNU GENERAL PUBLIC LICENSE $B$K=>$$$^$9!#(B
|
|
7 ;;
|
|
8 ;; $B$3$l$O(B ASCII $BG[Ns$N%-!<%\!<%I$G$+$JF~NO$G2>L>4A;zJQ49$r$9$k$?$a$N(B
|
|
9 ;; $BJQ49%k!<%k$r5-$7$?(B lisp $B$G$9!#;H$$J}$O<!$NDL$j$G$9!#(B
|
|
10 ;; (load "its/kanainput")
|
|
11 ;; (setq its:*standard-modes*
|
|
12 ;; (append (list (its:get-mode-map "kanainput")
|
|
13 ;; its:*standard-modes*)))
|
|
14 ;; (setq-default its:*current-map* (its:get-mode-map "kanainput"))
|
|
15 ;;
|
|
16
|
|
17 ;;
|
|
18 ;; $B0lHL$N(B JIS $B$+$J$H0c$&$H$3$m$O<!$G$9!#(B
|
|
19 ;; $B!&(B $B!V$m!W$,(B "|" $B$N0LCV$K!#K\Mh$N!V$m!W$N0LCV$K%-!<$,$J$$$?$a!#(B($BITJX(B)
|
|
20 ;; $B!&(B $B!V!<!W$,B?$/$N%"%9%-!<%-!<%\!<%I$G$O4|BT$H0c$&0LCV$K$"$k!#(B($BITJX(B)
|
|
21 ;; $B!&(B `$B!V(B' $B$,(B `[' $B$N0LCV$K!#(BASCII $B$N(B "[" $B$K5$;}$A$r9g$o$;$?!#(B
|
|
22 ;; $B!&(B `$B!W(B' $B$,(B `]' $B$N0LCV$K!#(BASCII $B$N(B "]" $B$K5$;}$A$r9g$o$;$?!#(B
|
|
23 ;; $B!&(B $B!V!)!W$,(B "?" $B$N0LCV$K!#(BASCII $B$N(B "?" $B$K5$;}$A$r9g$o$;$?!#(B
|
|
24 ;; $B!&(B $B!V!&!W$,(B ":" $B$N0LCV$K!#!V!)!W$r(B "?" $B$HF1$80LCV$K$9$k$?$a$:$i$7$?!#(B
|
|
25 ;;
|
|
26 ;; $BA43QJ8;z!"H>3QJ8;z!"(BJIS $B5-9fF~NO$NItJ,$O(B its/hira.el $B$HF1$8$K$7$^$7$?!#(B
|
|
27 ;; $BF~NO$N$?$a$N(B prefix $B$O0J2<$NDL$j!#(B
|
|
28 ;; Q: $BA43QF~NO(B (Quote $B$H3P$($k(B) ; k-zenkaku-escape $B$GDj5A2DG=(B
|
|
29 ;; A: $BH>3QF~NO(B (Ascii $B$H3P$($k(B) ; k-hankaku-escape $B$GDj5A2DG=(B
|
|
30 ;; S: $B5-9fF~NO(B (Symbol $B$H3P$($k(B) ; k-symbols-escape $B$GDj5A2DG=(B
|
|
31 ;;
|
|
32 ;;$B!V$+$JF~NO;~$NG[Ns!W(B
|
|
33 ;; $B$L!*(B $B$U!w(B $B$"$!(B $B$&$%(B $B$($'(B $B$*$)(B $B$d$c(B $B$f$e(B $B$h$g(B $B$o$r(B $B$[$m(B $B$X!\(B $B!<!A(B
|
|
34 ;; $B$?(B__ $B$F(B__ $B$$$#(B $B$9$9(B $B$+%u(B $B$s$s(B $B$J$J(B $B$K$K(B $B$i$i(B $B$;$;(B $B!I!V(B $B!,!W(B
|
|
35 ;; $B$A(B__ $B$H(B__ $B$7$7(B $B$O$O(B $B$-$-(B $B$/$/(B $B$^$^(B $B$N$N(B $B$j$j(B $B$l!&(B $B$1%v(B $B$`$m(B
|
|
36 ;; $B$D$C(B $B$5$5(B $B$=$=(B $B$R$R(B $B$3$3(B $B$_$_(B $B$b$b(B $B$M!"(B $B$k!#(B $B$a!)(B
|
|
37 ;;
|
|
38 ;;$B!V5-9fF~NO;~$NG[Ns!W(B(proposed by TANAKA Jiro <jiro@math.keio.ac.jp> 90.3.2)
|
|
39 ;; $B!{!|(B $B"&"'(B $B"$"%(B $B"""#(B $B!~"!(B $B!y!z(B $B!}!r(B $B!q!_(B $B!i!Z(B $B!j![(B $B!A!h(B $B!b!^(B $B!-!/(B
|
|
40 ;; $B!T!R(B $B!U!S(B ____ $B!9!8(B $B!:!x(B $B!o(B__ ____ ____ ____ $B")",(B $B!X!L(B $B!Y!M(B
|
|
41 ;; ____$B!3!4(B $B!5!6(B $B!7"*(B $B!>!=(B $B"+(B__ $B"-!2(B $B",!1(B $B"*(B__ $B!+!,(B $B!F!H(B $B!@!B(B
|
|
42 ;; ____ :-:-)$B!;!n(B $B"(!`(B $B!k"+(B $B!l"-(B $B!m".(B $B!E!e(B $B!D!f(B $B!&!g(B
|
|
43 ;;
|
|
44 ;;$B!VA[Dj$7$F$$$k(B ASCII $B%-!<%\!<%I$NG[Ns!W(B($BH>3Q!"A43QF~NO;~$b(B)
|
|
45 ;; 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ `~
|
|
46 ;; qQ wW eE rR tT yY uU iI oO pP [{ ]}
|
|
47 ;; aA sS dD fF gG hH jJ kK lL ;: '" \|
|
|
48 ;; zZ xX cC vV bB nN mM ,< .> /?
|
|
49 ;;
|
|
50 ;; kanainput.el 1.1 -> 1.2:
|
|
51 ;; o $B5-9fF~NO(B prefix $B$r(B "X" $B$+$i(B "S" $B$K$7$?!#(B
|
|
52 ;; o $B0J2<$NF~NOJ}K!$r4JC1$K$9$k$?$aJQ99$7$?!#(B
|
|
53 ;; $B!V$p!W(B "W4E" --> "WE"
|
|
54 ;; $B!V$q!W(B "W4%" --> "W%"
|
|
55 ;; $B!V%t!W(B "W4[" --> "W["
|
|
56 ;; o $B0J2<$NF~NO7k2L$rJQ99$7$?!#K\J*$N(B Quote $B$K$9$k$?$a!#(B
|
|
57 ;; "Q\\" $B!V!o!W(B-->$B!V!@!W(B
|
|
58 ;; "Q~" $B!V!1!W(B-->$B!V!A!W(B
|
|
59 ;; o $B0J2<$N%k!<%k$rDI2C$7$?!#(B
|
|
60 ;; "Sy" -->$B!V!o!W(B
|
|
61 ;; "SJ" -->$B!V!2!W(B
|
|
62 ;; "Sk" -->$B!V!1!W(B
|
|
63 ;; o $B3F%k!<%k$K$D$$$F(B its-defrule $B$r=q$$$F$$$?$N$r!"(B
|
|
64 ;; $B4JC1$N$?$aI=%Y!<%9$K$7$?!#(B
|
|
65 ;;
|
|
66
|
|
67 (its-define-mode "kanainput" "$B$+(B" t)
|
|
68 (defvar k-zenkaku-escape "Q") ; $BA43QF~NO$N(B prefix
|
|
69 (defvar k-hankaku-escape "A") ; $BH>3QF~NO$N(B prefix
|
|
70 (defvar k-symbols-escape "S") ; $B5-9fF~NO$N(B prefix
|
|
71
|
|
72
|
|
73 (defun its:make-terminal-state-kanainput (map input action state)
|
|
74 (cond((its:standard-actionp action) (action-output action))
|
|
75 (t nil)))
|
|
76
|
|
77 (let ((its:make-terminal-state 'its:make-terminal-state-kanainput))
|
|
78 ;; $B$+$JF~NOMQ(B
|
|
79 (dolist (normal-pair
|
|
80 '(
|
|
81 ;; $B@62;(B
|
|
82 ("3" "$B$"(B") ("e" "$B$$(B") ("4" "$B$&(B") ("5" "$B$((B") ("6" "$B$*(B")
|
|
83 ("t" "$B$+(B") ("g" "$B$-(B") ("h" "$B$/(B") ("'" "$B$1(B") ("b" "$B$3(B")
|
|
84 ("x" "$B$5(B") ("d" "$B$7(B") ("r" "$B$9(B") ("p" "$B$;(B") ("c" "$B$=(B")
|
|
85 ("q" "$B$?(B") ("a" "$B$A(B") ("z" "$B$D(B") ("w" "$B$F(B") ("s" "$B$H(B")
|
|
86 ("u" "$B$J(B") ("i" "$B$K(B") ("1" "$B$L(B") ("," "$B$M(B") ("k" "$B$N(B")
|
|
87 ("f" "$B$O(B") ("v" "$B$R(B") ("2" "$B$U(B") ("=" "$B$X(B") ("-" "$B$[(B")
|
|
88 ("j" "$B$^(B") ("n" "$B$_(B") ("\\" "$B$`(B") ("/" "$B$a(B") ("m" "$B$b(B")
|
|
89 ("7" "$B$d(B") ("8" "$B$f(B") ("9" "$B$h(B")
|
|
90 ("o" "$B$i(B") ("l" "$B$j(B") ("." "$B$k(B") (";" "$B$l(B") ("|" "$B$m(B")
|
|
91 ("0" "$B$o(B") ("WE" "$B$p(B") ("W%" "$B$q(B") (")" "$B$r(B")
|
|
92 ("y" "$B$s(B")
|
|
93 ;; $BBy2;(B
|
|
94 ("t[" "$B$,(B") ("g[" "$B$.(B") ("h[" "$B$0(B") ("'[" "$B$2(B") ("b[" "$B$4(B")
|
|
95 ("x[" "$B$6(B") ("d[" "$B$8(B") ("r[" "$B$:(B") ("p[" "$B$<(B") ("c[" "$B$>(B")
|
|
96 ("q[" "$B$@(B") ("a[" "$B$B(B") ("z[" "$B$E(B") ("w[" "$B$G(B") ("s[" "$B$I(B")
|
|
97 ("f[" "$B$P(B") ("v[" "$B$S(B") ("2[" "$B$V(B") ("=[" "$B$Y(B") ("-[" "$B$\(B")
|
|
98 ;; $BH>By2;(B
|
|
99 ("f]" "$B$Q(B") ("v]" "$B$T(B") ("2]" "$B$W(B") ("=]" "$B$Z(B") ("-]" "$B$](B")
|
|
100 ;; $B>.$5$J;z(B
|
|
101 ("#" "$B$!(B") ("E" "$B$#(B") ("$" "$B$%(B") ("%" "$B$'(B") ("^" "$B$)(B")
|
|
102 ("&" "$B$c(B") ("*" "$B$e(B") ("(" "$B$g(B")
|
|
103 ("T" "$B%u(B") ("\"" "$B%v(B") ("Z" "$B$C(B") ("W0" "$B$n(B") ("W#" "$B$n(B")
|
|
104 ;; $B$=$NB>(B
|
|
105 ("W[" "$B%t(B") ("W" "$B$&(B")
|
|
106 ;; $B5-9f(B
|
|
107 ("<" "$B!"(B") (">" "$B!#(B") (":" "$B!&(B") ("?" "$B!)(B")
|
|
108 ("{" "$B!V(B") ("}" "$B!W(B") ("[" "$B!+(B") ("]" "$B!,(B") ("`" "$B!<(B")
|
|
109 ;; $B%7%U%H%-!<2!2<;~$N07$$(B
|
|
110 ("G" "$B$-(B") ("H" "$B$/(B") ("B" "$B$3(B")
|
|
111 ("X" "$B$5(B") ("D" "$B$7(B") ("R" "$B$9(B") ("P" "$B$;(B") ("C" "$B$=(B")
|
|
112 ("U" "$B$J(B") ("I" "$B$K(B") ("K" "$B$N(B")
|
|
113 ("F" "$B$O(B") ("V" "$B$R(B")
|
|
114 ("J" "$B$^(B") ("N" "$B$_(B") ("M" "$B$b(B")
|
|
115 ("O" "$B$i(B") ("L" "$B$j(B")
|
|
116 ("Y" "$B$s(B")
|
|
117 ("!" "$B!*(B") ("@" "$B!w(B") ("+" "$B!\(B") ("~" "$B!A(B")
|
|
118 ("_" "$B$m(B");;; $B!V$m!W$,$"$k%-!<%\!<%IMQ(B
|
|
119 ))
|
|
120 (its-defrule (car normal-pair) (car (cdr normal-pair))))
|
|
121
|
|
122 ;; $BA43QF~NO(B
|
|
123 (dolist (zenkaku-pair
|
|
124 '(
|
|
125 (" " "$B!!(B") ("!" "$B!*(B") ("\"" "$B!I(B") ("#" "$B!t(B") ; 20--24
|
|
126 ("$" "$B!p(B") ("%" "$B!s(B") ("&" "$B!u(B") ("'" "$B!G(B") ; 25--27
|
|
127 ("(" "$B!J(B") (")" "$B!K(B") ("*" "$B!v(B") ("+" "$B!\(B") ; 28--2b
|
|
128 ("," "$B!$(B") ("-" "$B!](B") ("." "$B!%(B") ("/" "$B!?(B") ; 2c--2f
|
|
129 ("0" "$B#0(B") ("1" "$B#1(B") ("2" "$B#2(B") ("3" "$B#3(B") ; 30--33
|
|
130 ("4" "$B#4(B") ("5" "$B#5(B") ("6" "$B#6(B") ("7" "$B#7(B") ; 34--37
|
|
131 ("8" "$B#8(B") ("9" "$B#9(B") (":" "$B!'(B") (";" "$B!((B") ; 38--3b
|
|
132 ("<" "$B!c(B") ("=" "$B!a(B") (">" "$B!d(B") ("?" "$B!)(B") ; 3c--3f
|
|
133 ("@" "$B!w(B") ("A" "$B#A(B") ("B" "$B#B(B") ("C" "$B#C(B") ; 40--43
|
|
134 ("D" "$B#D(B") ("E" "$B#E(B") ("F" "$B#F(B") ("G" "$B#G(B") ; 44--47
|
|
135 ("H" "$B#H(B") ("I" "$B#I(B") ("J" "$B#J(B") ("K" "$B#K(B") ; 48--4b
|
|
136 ("L" "$B#L(B") ("M" "$B#M(B") ("N" "$B#N(B") ("O" "$B#O(B") ; 4c--4f
|
|
137 ("P" "$B#P(B") ("Q" "$B#Q(B") ("R" "$B#R(B") ("S" "$B#S(B") ; 50--53
|
|
138 ("T" "$B#T(B") ("U" "$B#U(B") ("V" "$B#V(B") ("W" "$B#W(B") ; 54--57
|
|
139 ("X" "$B#X(B") ("Y" "$B#Y(B") ("Z" "$B#Z(B") ("[" "$B!N(B") ; 58--5a
|
|
140 ("\\" "$B!@(B") ("]" "$B!O(B") ("^" "$B!0(B") ("_" "$B!2(B") ; 5b--5f
|
|
141 ("`" "$B!.(B") ("a" "$B#a(B") ("b" "$B#b(B") ("c" "$B#c(B") ; 60--63
|
|
142 ("d" "$B#d(B") ("e" "$B#e(B") ("f" "$B#f(B") ("g" "$B#g(B") ; 64--67
|
|
143 ("h" "$B#h(B") ("i" "$B#i(B") ("j" "$B#j(B") ("k" "$B#k(B") ; 68--6b
|
|
144 ("l" "$B#l(B") ("m" "$B#m(B") ("n" "$B#n(B") ("o" "$B#o(B") ; 6c--6f
|
|
145 ("p" "$B#p(B") ("q" "$B#q(B") ("r" "$B#r(B") ("s" "$B#s(B") ; 70--73
|
|
146 ("t" "$B#t(B") ("u" "$B#u(B") ("v" "$B#v(B") ("w" "$B#w(B") ; 74--77
|
|
147 ("x" "$B#x(B") ("y" "$B#y(B") ("z" "$B#z(B") ("{" "$B!P(B") ; 78--7b
|
|
148 ("|" "$B!C(B") ("}" "$B!Q(B") ("~" "$B!A(B") ; 7c--7e
|
|
149 ))
|
|
150 (its-defrule (concat k-zenkaku-escape (car zenkaku-pair))
|
|
151 (car (cdr zenkaku-pair))))
|
|
152
|
|
153 ;; $BH>3QF~NO(B
|
|
154 (dolist (character
|
|
155 '( "1" "2" "3" "4" "5" "6" "7" "8" "9" "0"
|
|
156 " " "!" "@" "#" "$" "%" "^" "&" "*" "(" ")"
|
|
157 "-" "=" "`" "\\" "|" "_" "+" "~" "[" "]" "{" "}"
|
|
158 ":" ";" "\"" "'" "<" ">" "?" "/" "," "."
|
|
159 "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n"
|
|
160 "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"
|
|
161 "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N"
|
|
162 "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"))
|
|
163 (its-defrule (concat k-hankaku-escape character) character))
|
|
164
|
|
165 ;;; proposal key bindings for JIS symbols
|
|
166 ;;; 90.3.2 by jiro@math.keio.ac.jp (TANAKA Jiro)
|
|
167 ;;; $B!V!o!W!"!V!1!W!"!V!2!W(B are added
|
|
168 ;;; 94.2.4 by nori-d@is.aist-nara.ac.jp (DEMIZU Noritoshi)
|
|
169 (dolist (symbols-pair
|
|
170 '(
|
|
171 ("1" "$B!{(B") ("2" "$B"&(B") ("3" "$B"$(B") ("4" "$B""(B") ("5" "$B!~(B")
|
|
172 ("6" "$B!y(B") ("7" "$B!}(B") ("8" "$B!q(B") ("9" "$B!i(B") ("0" "$B!j(B")
|
|
173 ("-" "$B!A(B") ("=" "$B!b(B") ("\\" "$B!@(B") ("`" "$B!-(B")
|
|
174 ("!" "$B!|(B") ("@" "$B"'(B") ("#" "$B"%(B") ("$" "$B"#(B") ("%" "$B"!(B")
|
|
175 ("^" "$B!z(B") ("&" "$B!r(B") ("*" "$B!_(B") ("(" "$B!Z(B") (")" "$B![(B")
|
|
176 ("_" "$B!h(B") ("+" "$B!^(B") ("|" "$B!B(B") ("~" "$B!/(B")
|
|
177 ("q" "$B!T(B") ("w" "$B!U(B") ("r" "$B!9(B") ("t" "$B!:(B") ("y" "$B!o(B")
|
|
178 ("Q" "$B!R(B") ("W" "$B!S(B") ("R" "$B!8(B") ("T" "$B!x(B")
|
|
179 ("p" "$B")(B") ("[" "$B!X(B") ("]" "$B!Y(B")
|
|
180 ("P" "$B",(B") ("{" "$B!L(B") ("}" "$B!M(B")
|
|
181 ("s" "$B!3(B") ("d" "$B!5(B") ("f" "$B!7(B") ("g" "$B!>(B")
|
|
182 ("S" "$B!4(B") ("D" "$B!6(B") ("F" "$B"*(B") ("G" "$B!=(B")
|
|
183 ("h" "$B"+(B") ("j" "$B"-(B") ("k" "$B",(B") ("l" "$B"*(B")
|
|
184 ("J" "$B!2(B") ("K" "$B!1(B")
|
|
185 (";" "$B!+(B") (":" "$B!,(B") ("\'" "$B!F(B") ("\"" "$B!H(B")
|
|
186 ("x" ":-") ("c" "$B!;(B") ("v" "$B"((B") ("b" "$B!k(B") ("n" "$B!l(B")
|
|
187 ("X" ":-)") ("C" "$B!n(B") ("V" "$B!`(B") ("B" "$B"+(B") ("N" "$B"-(B")
|
|
188 ("m" "$B!m(B") ("," "$B!E(B") ("." "$B!D(B") ("/" "$B!&(B")
|
|
189 ("M" "$B".(B") ("<" "$B!e(B") (">" "$B!f(B") ("?" "$B!g(B")
|
|
190 ))
|
|
191 (its-defrule (concat k-symbols-escape (car symbols-pair))
|
|
192 (car (cdr symbols-pair))))
|
|
193 )
|