1 ;;; quail/tibetan.el -- Quail package for inputting Tibetan characters
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
6 ;; Keywords: multilingual, input method, Tibetan
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 ;; Author: Toru TOMABECHI, <Toru.Tomabechi@orient.unil.ch>
26 ;; Created: Feb. 17. 1997
29 ;; 1997.03.13 Support for inputting special signs and punctuations added.
30 ;; (Only Ext. Wylie input)
37 ;;; Functions for making some composite punctuations.
40 (defun tibetan-quail-bzhi-shad (&rest ignore)
42 (quail-delete-overlays)
43 (insert (compose-chars ?
\e$(7!>
\e(B '(mr . ml) ?\x20 '(mr . ml) ?
\e$(7!>
\e(B))
44 (throw 'quail-tag nil))
46 (defun tibetan-quail-nyi-zla (&rest ignore)
48 (quail-delete-overlays)
49 (insert (compose-chars ?
\e$(7#R
\e(B '(mr . ml) ?
\e$(7#S
\e(B))
50 (throw 'quail-tag nil))
52 (defun tibetan-quail-nyi-zla-phur-shad (&rest ignore)
54 (quail-delete-overlays)
55 (insert (compose-chars ?
\e$(7#R
\e(B '(mr . ml) ?
\e$(7#S
\e(B '(bc . tl) ?
\e$(7!I
\e(B))
56 (throw 'quail-tag nil))
58 (defun tibetan-quail-nyi-zla-double (&rest ignore)
60 (quail-delete-overlays)
61 (insert (compose-chars ?
\e$(7#R
\e(B '(mr . ml) ?
\e$(7#S
\e(B '(mr . ml) ?
\e$(7#S
\e(B))
62 (throw 'quail-tag nil))
64 (defun tibetan-quail-nyi-zla-triple (&rest ignore)
66 (quail-delete-overlays)
67 (insert (compose-chars ?
\e$(7#R
\e(B '(mr . ml) ?
\e$(7#S
\e(B '(mr . ml) ?
\e$(7#S
\e(B '(mr . ml) ?
\e$(7#S
\e(B))
68 (throw 'quail-tag nil))
71 ;;; Setting-ups for Extended Wylie input.
74 (defun quail-tibetan-input-wylie (key &rest ignore)
77 (quail-delete-overlays)
78 (setq pc (char-before (overlay-start quail-overlay))
79 quail-current-str (tibetan-composition pc key))
83 (insert (aref quail-current-str 0))
84 (setq quail-current-str (substring quail-current-str 1))))
85 (move-overlay quail-overlay (point) (point))
86 (insert quail-current-str)
87 (throw 'quail-tag nil)))
90 (quail-define-package "tibetan-wylie" "Tibetan" "TIBw" t
91 "Tibetan character input by Extended Wylie key assignment.
93 +-------------------------------------+
94 |
\e2
\e$(7"!`#T
\e(B
\e1
\e$(8!;
\e(B k |
\e2
\e$(7""`#T
\e(B
\e1
\e$(8!;
\e(B kh |
\e2
\e$(7"#`#T
\e(B
\e1
\e$(8!;
\e(B g |
\e2
\e$(7"$`#T
\e(B
\e1
\e$(8!;
\e(B gh |
\e2
\e$(7"%`#T
\e(B
\e1
\e$(8!;
\e(B ng|
\e$(7"S
\e(B i
\e$(8!=
\e(B /
95 |
\e2
\e$(7"&`#T
\e(B
\e1
\e$(8!;
\e(B c |
\e2
\e$(7"'`#T
\e(B
\e1
\e$(8!;
\e(B ch |
\e2
\e$(7"(`#T
\e(B
\e1
\e$(8!;
\e(B j | |
\e$(7"*
\e$(8!;
\e(B ny|
\e$(7"U
\e(B u
\e$(7!>
\e(B //
96 |
\e$(7"+
\e$(8!;
\e(B T |
\e$(7",
\e$(8!;
\e(B TH |
\e$(7"-
\e$(8!;
\e(B D |
\e$(7".
\e$(8!;
\e(B DH |
\e$(7"/
\e$(8!;
\e(B N |
\e$(7"[
\e(B e
\e2
\e$(7!>P
\e(B P
\e$(7!>
\e(B
\e1 ////
97 |
\e$(7"0
\e$(8!;
\e(B t |
\e$(7"1
\e$(8!;
\e(B th |
\e$(7"2
\e$(8!;
\e(B d |
\e$(7"3
\e$(8!;
\e(B dh |
\e$(7"4
\e$(8!;
\e(B n |
\e$(7"]
\e(B o
\e$(7!A
\e(B ;
98 |
\e$(7"5
\e$(8!;
\e(B p |
\e$(7"6
\e$(8!;
\e(B ph |
\e$(7"7
\e$(8!;
\e(B b |
\e$(7"8
\e$(8!;
\e(B bh |
\e$(7"9
\e$(8!;
\e(B m |
\e$(7"\
\e(B ai (ee, E)
\e$(8!?
\e(B $
99 |
\e$(7":
\e$(8!;
\e(B ts|
\e$(7";
\e$(8!;
\e(B tsh|
\e$(7"<
\e$(8!;
\e(B dz |
\e$(7"=
\e$(8!;
\e(B dzh|
\e$(7">
\e$(8!;
\e(B w |
\e$(7"^
\e(B au (oo, O)
\e$(8!@
\e(B &
100 |
\e$(7"?
\e$(8!;
\e(B zh|
\e$(7"@
\e$(8!;
\e(B z |
\e$(7"A
\e$(8!;
\e(B ' | |
\e$(7"B
\e$(8!;
\e(B y |
\e$(7"a
\e(B I
\e2
\e$(7#RP#SP#S
\e(B
\e1 *
101 |
\e$(7"C
\e$(8!;
\e(B r |
\e$(7"D
\e$(8!;
\e(B l |
\e$(7"E
\e$(8!;
\e(B sh |
\e$(7"F
\e$(8!;
\e(B SH |
\e$(7"G
\e$(8!;
\e(B s |
\e$(7"`
\e(B :
\e2
\e$(7#RP#SP#SP#S
\e(B
\e1 #
102 |
\e$(7"H
\e$(8!;
\e(B h |
\e$(7"I
\e$(8!;
\e(B A |
\e$(7"J
\e$(8!;
\e(B kSH| | |
\e$(7"_
\e(B M
\e$(7!l
\e(B
\e$(7!m
\e(B < >
103 +-------------------------------------+
\e$(8!D
\e(B %
104 (The consonant
\e$(7"I
\e$(8!;
\e(B must be typed explicitly.)
106 NOT SPECIFIED IN EXT. WYLIE:
107 +--------------------------------------------------------+
108 |
\e$(7"c
\e(B = ~ |
\e$(7"d
\e(B = ` |
\e$(7"e
\e(B = , |
\e$(7"f
\e(B = @ |
\e$(7!g
\e(B = _o|
\e$(7!e
\e(B = _O|
\e2
\e$(7#RP#S_!I
\e(B
\e1 = ^|
109 +--------------------------------------------------------+
110 |
\e$(7"i
\e(B = x |
\e$(7"j
\e(B = X |
\e$(7"g
\e(B = v |
\e$(7"h
\e(B = V |
\e$(7"k
\e(B = q |
\e$(7"l
\e(B = Q |
111 +-----------------------------------------------+
114 + : Consonant Stacking
115 \(Consonant stacking for ordinary Tibetan is done automatically)
116 - : No Consonant Stacking
117 \(To suppress automatic stacking for \"g-y\",
118 and to get da-drag in -r-d, -l-d .)
121 Tsheg is assigned to SPC. Space is assigned to period '.'.
127 ("k" quail-tibetan-input-wylie)
128 ("g" quail-tibetan-input-wylie)
129 ("c" quail-tibetan-input-wylie)
130 ("j" quail-tibetan-input-wylie)
131 ("T" quail-tibetan-input-wylie)
132 ("D" quail-tibetan-input-wylie)
133 ("N" quail-tibetan-input-wylie)
134 ("t" quail-tibetan-input-wylie)
135 ("d" quail-tibetan-input-wylie)
136 ("n" quail-tibetan-input-wylie)
137 ("p" quail-tibetan-input-wylie)
138 ("b" quail-tibetan-input-wylie)
139 ("m" quail-tibetan-input-wylie)
140 ("w" quail-tibetan-input-wylie)
141 ("z" quail-tibetan-input-wylie)
142 ("'" quail-tibetan-input-wylie)
143 ("y" quail-tibetan-input-wylie)
144 ("r" quail-tibetan-input-wylie)
145 ("l" quail-tibetan-input-wylie)
146 ("SH" quail-tibetan-input-wylie)
147 ("s" quail-tibetan-input-wylie)
148 ("h" quail-tibetan-input-wylie)
149 ("H" quail-tibetan-input-wylie)
150 ("A" quail-tibetan-input-wylie)
151 ("+k" quail-tibetan-input-wylie)
152 ("+g" quail-tibetan-input-wylie)
153 ("+c" quail-tibetan-input-wylie)
154 ("+j" quail-tibetan-input-wylie)
155 ("+T" quail-tibetan-input-wylie)
156 ("+D" quail-tibetan-input-wylie)
157 ("+N" quail-tibetan-input-wylie)
158 ("+t" quail-tibetan-input-wylie)
159 ("+d" quail-tibetan-input-wylie)
160 ("+n" quail-tibetan-input-wylie)
161 ("+p" quail-tibetan-input-wylie)
162 ("+b" quail-tibetan-input-wylie)
163 ("+m" quail-tibetan-input-wylie)
164 ("+w" quail-tibetan-input-wylie)
165 ("+z" quail-tibetan-input-wylie)
166 ("+'" quail-tibetan-input-wylie)
167 ("+y" quail-tibetan-input-wylie)
168 ("+r" quail-tibetan-input-wylie)
169 ("+l" quail-tibetan-input-wylie)
170 ("+SH" quail-tibetan-input-wylie)
171 ("+s" quail-tibetan-input-wylie)
172 ("+h" quail-tibetan-input-wylie)
173 ("+H" quail-tibetan-input-wylie)
174 ("+A" quail-tibetan-input-wylie)
175 ("-d" ?
\e$(7"2
\e(B) ; To avoid default stacking
176 ("-y" ?
\e$(7"B
\e(B) ; Idem.
177 ("a" quail-tibetan-input-wylie) ; invisible vowel sign
178 ("i" quail-tibetan-input-wylie)
179 ("u" quail-tibetan-input-wylie)
180 ("e" quail-tibetan-input-wylie)
181 ("o" quail-tibetan-input-wylie)
182 ("I" quail-tibetan-input-wylie)
183 ("E" quail-tibetan-input-wylie)
184 ("O" quail-tibetan-input-wylie)
185 ("M" quail-tibetan-input-wylie)
186 ("~" quail-tibetan-input-wylie)
187 ("`" quail-tibetan-input-wylie)
188 ("," quail-tibetan-input-wylie)
189 ("x" quail-tibetan-input-wylie)
190 ("X" quail-tibetan-input-wylie)
191 ("v" quail-tibetan-input-wylie)
192 ("V" quail-tibetan-input-wylie)
193 ("q" quail-tibetan-input-wylie)
194 ("Q" quail-tibetan-input-wylie)
195 ("_o" quail-tibetan-input-wylie)
196 ("_O" quail-tibetan-input-wylie)
197 ;;; ("_/" quail-tibetan-input-wylie)
202 ("////" tibetan-quail-bzhi-shad)
204 ("/\"" ?
\e$(8!@
\e(B) ; Not defined in Ext. Wylie.
212 ("*" tibetan-quail-nyi-zla-double)
213 ("#" tibetan-quail-nyi-zla-triple)
214 ("^" tibetan-quail-nyi-zla-phur-shad)
235 ("|" "
\e$(7!1!2!3!9!:!B!C!E!F!G!H!I!J!K!L!M!N!O!d!f!h!j!k!n!o
\e(B")
239 ;;; Setting-ups for TibKey input
242 (defconst tibetan-tibkey-to-transcription-alist
244 ("`" . "`") ; sna ldan
245 ("~" . "~") ; sna ldan + nada
252 ("T" . "I") ; gi gu log
265 ("A" . "a") ; Vowel a (not used in original TibKey)
269 ("F" . "M") ; anusvara
270 ("g" . "u") ; zhabs kyu
272 ("H" . ",") ; viraama
274 ("J" . "e") ; 'greng bu
279 ("\"" . "+w") ; wa zur
283 ("C" . "+'") ; 'a chung
285 ("V" . "+y") ; ya btags
287 ("B" . "+r") ; ra btags
289 ("N" . "+l") ; la btags
297 ("hQ" ."+kSH") ; kSHa
318 ("hl" . "+tsh") ; tsha
334 (defun quail-tibetan-input-tibkey (key &rest ignore)
336 (setq trans (cdr (assoc key tibetan-tibkey-to-transcription-alist)))
337 (quail-delete-region)
338 (quail-delete-overlays)
339 (setq pc (char-before (overlay-start quail-overlay))
340 quail-current-str (tibetan-composition pc trans))
344 (insert (aref quail-current-str 0))
345 (setq quail-current-str (substring quail-current-str 1))))
346 (move-overlay quail-overlay (point) (point))
347 (insert quail-current-str)
348 (throw 'quail-tag nil)))
352 (quail-define-package "tibetan-tibkey" "Tibetan" "TIBt" t
353 "Tibetan character input by TibKey key assignment.
355 (This implementation is still incomplete.
356 Therefore, the following key assignment is a provisional one.)
360 +-------------------------------------------------------+
361 |`
\e$(7"d
\e(B|1
\e$(7!Q
\e(B|2
\e$(7!R
\e(B|3
\e$(7!S
\e(B|4
\e$(7!T
\e(B|5
\e$(7!U
\e(B|6
\e$(7!V
\e(B|7
\e$(7!W
\e(B|8
\e$(7!X
\e(B|9
\e$(7!Y
\e(B|0
\e$(7!P
\e(B|- |= |\\
\e$(7!8
\e(B|
362 +-------------------------------------------------------+
363 |q
\e$(7"!
\e(B|w
\e$(7""
\e(B|e
\e$(7"#
\e(B|r
\e$(7"%
\e(B|t
\e$(7"&
\e(B|y
\e$(7"'
\e(B|u
\e$(7"(
\e(B|i
\e$(7"*
\e(B|o
\e$(7"0
\e(B|p
\e$(7"1
\e(B|[
\e$(7"2
\e(B|]
\e$(7"4
\e(B|
364 +-----------------------------------------------+
365 |a
\e$(7"5
\e(B| s
\e$(7"6
\e(B| d
\e$(7"7
\e(B|f
\e$(7"9
\e(B|g
\e$(7"U
\e(B|h |j
\e$(7"]
\e(B|k
\e$(7":
\e(B|l
\e$(7";
\e(B|;
\e$(7"<
\e(B|'
\e$(7">
\e(B|
366 +---------------------------------------------+
367 |z
\e$(7"?
\e(B|x
\e$(7"@
\e(B|c
\e$(7"A
\e(B|v
\e$(7"B
\e(B|b
\e$(7"C
\e(B|n
\e$(7"D
\e(B|m
\e$(7"E
\e(B|,
\e$(7"G
\e(B|.
\e$(7"H
\e(B|/
\e$(7"I
\e(B|
368 +---------------------------------------+
369 The key 'h' is used for consonant stacking.
373 +----------------------------------------------------------+
374 |~
\e$(7"c
\e(B|!
\e2
\e$(7#RP#S
\e(B
\e1|@
\e$(7#S
\e(B|# |$ |%
\e$(8!D
\e(B |^
\e$(7!1
\e(B|& |* |(
\e$(7!l
\e(B|)
\e$(7!m
\e(B|_ |+
\e$(7!A
\e(B| |
\e$(7!8
\e(B|
375 +----------------------------------------------------------+
376 |Q
\e$(7"J
\e(B|W
\e$(7#T
\e(B|E |R |T
\e$(7"a
\e(B|Y |U |I
\e$(7"f
\e(B|O
\e$(7"+
\e(B|P
\e$(7",
\e(B|{
\e$(7"-
\e(B|}
\e$(7"/
\e(B|
377 +-----------------------------------------------+
378 |A |S |D |F
\e$(7"_
\e(B|G
\e$(7"S
\e(B|H
\e$(7"e
\e(B|J
\e$(7"[
\e(B|K |L |:
\e$(7"`
\e(B|\"
\e$(7#>
\e(B|
379 +-------------------------------------------+
380 |Z |X |C
\e$(7#A
\e(B|V
\e$(7#B
\e(B|B
\e$(7#C
\e(B|N
\e$(7#D
\e(B|M
\e$(7"F
\e(B|< |> |?
\e$(8!=
\e(B |
381 +---------------------------------------+
383 DIFFERENCE FROM THE ORIGINAL TIBKEY:
385 1. Vowel 'a' should be typed explicitly by the key 'A'.
386 This is really inconvenient. But to make the coding
387 scheme clear, it is desirable to have an explicite
389 2. Tsheg is assigned to SPC key. You can input a space
391 4. To avoid the default stacking
\e$(7$B
\e(B and to obtain
\e$(7"#"B
\e(B,
392 type 'E' instead of 'v' (=
\e$(7"B
\e(B).
393 3. There are many characters that are not supported in the
394 current implementation (especially special signs). I hope
395 I'll complete in a future revision.
400 ("`" quail-tibetan-input-tibkey) ; sna ldan, not supported yet
401 ("~" quail-tibetan-input-tibkey) ; sna ldan + nada
403 ("!" tibetan-quail-nyi-zla) ; nyi zla long
405 ("@" ?
\e$(7#S
\e(B) ; nyi zla simple
416 ;;; ("*" ) ; avagraha, not supported yet
421 ;;; ("-" ) ; enphatic, not yet supported
423 ;;; ("=" ) ; special sign, not yet supported
427 ("q" quail-tibetan-input-tibkey) ; ka
428 ("Q" quail-tibetan-input-tibkey) ; kSHa
429 ("w" quail-tibetan-input-tibkey) ; kha
430 ("e" quail-tibetan-input-tibkey) ; ga
432 ("r" quail-tibetan-input-tibkey) ; nga
433 ("t" quail-tibetan-input-tibkey) ; ca
434 ("T" quail-tibetan-input-tibkey) ; gi gu log
435 ("y" quail-tibetan-input-tibkey) ; cha
436 ("u" quail-tibetan-input-tibkey) ; ja
437 ("i" quail-tibetan-input-tibkey) ; nya
438 ("I" ?
\e$(7"f
\e(B) ; avagraha
439 ("o" quail-tibetan-input-tibkey) ; ta
440 ("O" quail-tibetan-input-tibkey) ; Ta
441 ("p" quail-tibetan-input-tibkey) ; tha
442 ("P" quail-tibetan-input-tibkey) ; THa
443 ("[" quail-tibetan-input-tibkey) ; da
444 ("{" quail-tibetan-input-tibkey) ; Da
445 ("]" quail-tibetan-input-tibkey) ; na
446 ("}" quail-tibetan-input-tibkey) ; Na
447 ("a" quail-tibetan-input-tibkey) ; pa
448 ("A" quail-tibetan-input-tibkey) ; Vowel sign a
449 ("s" quail-tibetan-input-tibkey) ; pha
450 ("d" quail-tibetan-input-tibkey) ; ba
451 ;;; ("D" ) ; special sign, not supported yet
452 ("f" quail-tibetan-input-tibkey) ; ma
453 ("F" quail-tibetan-input-tibkey) ; anusvara
454 ("g" quail-tibetan-input-tibkey) ; zhabs kyu
455 ("G" quail-tibetan-input-tibkey) ; gi gu
456 ("H" quail-tibetan-input-tibkey) ; viraama
457 ("j" quail-tibetan-input-tibkey) ; naro
458 ("J" quail-tibetan-input-tibkey) ; 'greng bu
459 ("k" quail-tibetan-input-tibkey);;tsa
460 ;;; ("K" ) ; tsadru, not supported yet
461 ("l" quail-tibetan-input-tibkey) ; tsha
462 (";" quail-tibetan-input-tibkey) ; dza
464 ("'" quail-tibetan-input-tibkey) ; wa
465 ("\"" quail-tibetan-input-tibkey) ; wa zur
466 ("z" quail-tibetan-input-tibkey) ; zha
467 ("x" quail-tibetan-input-tibkey) ; za
468 ("c" quail-tibetan-input-tibkey) ; 'a
469 ("C" quail-tibetan-input-tibkey) ; 'a chung
470 ("v" quail-tibetan-input-tibkey) ; ya
471 ("V" quail-tibetan-input-tibkey) ; ya btags
472 ("b" quail-tibetan-input-tibkey) ; ra
473 ("B" quail-tibetan-input-tibkey) ; ra btags
474 ("n" quail-tibetan-input-tibkey) ; la
475 ("N" quail-tibetan-input-tibkey) ; la btags
476 ("m" quail-tibetan-input-tibkey) ; sha
477 ("M" quail-tibetan-input-tibkey) ; SHa
478 ("," quail-tibetan-input-tibkey) ; sa
479 ("." quail-tibetan-input-tibkey) ; ha
480 ;;; (">" ?
\e$(8!;
\e(B) ; to be assigned to SPC
482 ("/" quail-tibetan-input-tibkey) ; Aa
485 ("????" tibetan-quail-bzhi-shad)
488 ("hq" quail-tibetan-input-tibkey) ; ka
489 ("hQ" quail-tibetan-input-tibkey) ; kSHa
490 ("hw" quail-tibetan-input-tibkey) ; kha
491 ("he" quail-tibetan-input-tibkey) ; ga
492 ("hr" quail-tibetan-input-tibkey) ; nga
493 ("ht" quail-tibetan-input-tibkey) ; ca
494 ("hy" quail-tibetan-input-tibkey) ; cha
495 ("hu" quail-tibetan-input-tibkey) ; ja
496 ("hi" quail-tibetan-input-tibkey) ; nya
497 ("ho" quail-tibetan-input-tibkey) ; ta
498 ("hO" quail-tibetan-input-tibkey) ; Ta
499 ("hp" quail-tibetan-input-tibkey) ; tha
500 ("hP" quail-tibetan-input-tibkey) ; THa
501 ("h[" quail-tibetan-input-tibkey) ; da
502 ("h{" quail-tibetan-input-tibkey) ; Da
503 ("h]" quail-tibetan-input-tibkey) ; na
504 ("h}" quail-tibetan-input-tibkey) ; Na
505 ("ha" quail-tibetan-input-tibkey) ; pa
506 ("hs" quail-tibetan-input-tibkey) ; pha
507 ("hd" quail-tibetan-input-tibkey) ; ba
508 ("hf" quail-tibetan-input-tibkey) ; ma
509 ("hk" quail-tibetan-input-tibkey) ; tsa
510 ("hl" quail-tibetan-input-tibkey) ; tsha
511 ("h;" quail-tibetan-input-tibkey) ; dza
512 ("h'" quail-tibetan-input-tibkey) ; wa
513 ("hz" quail-tibetan-input-tibkey) ; zha
514 ("hx" quail-tibetan-input-tibkey) ; za
515 ("hc" quail-tibetan-input-tibkey) ; 'a
516 ("hv" quail-tibetan-input-tibkey) ; ya
517 ("hb" quail-tibetan-input-tibkey) ; ra
518 ("hn" quail-tibetan-input-tibkey) ; la
519 ("hm" quail-tibetan-input-tibkey) ; sha
520 ("hM" quail-tibetan-input-tibkey) ; SHa
521 ("h," quail-tibetan-input-tibkey) ; sa
522 ("h." quail-tibetan-input-tibkey) ; ha
523 ("h/" quail-tibetan-input-tibkey) ; Aa
526 ;;; quail/tibetan.el ends here.