1 ;;; thai.el --- Quail package for inputting Thai characters -*-coding: iso-2022-7bit;-*-
3 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 ;; 2005, 2006, 2007, 2008
5 ;; National Institute of Advanced Industrial Science and Technology (AIST)
6 ;; Registration Number H14PRO021
8 ;; Keywords: multilingual, input method, Thai
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
33 (defmacro thai-generate-quail-map (translation-table)
35 (dotimes (i (length translation-table))
36 (let ((trans (aref translation-table i)))
37 (when (not (eq trans 0))
38 (if (> (length trans) 1)
39 (setq trans (vector trans))
40 (setq trans (aref trans 0)))
41 (setq map (cons (list (char-to-string i) trans) map)))))
42 `(quail-define-rules ,@map)))
44 ;; Thai Kesmanee keyboard support.
47 "thai-kesmanee" "Thai" "
\e,T!!
\e(B>" t
48 "Thai Kesmanee input method with TIS620 keyboard layout
50 The difference from the ordinal Thai keyboard:
51 '
\e,T_
\e(B' and '
\e,To
\e(B' are assigned to '\\' and '|' respectively,
52 '
\e,T#
\e(B' and '
\e,T%
\e(B' are assigned to '`' and '~' respectively,
53 Don't know where to assign characters '
\e,Tz
\e(B' and '
\e,T{
\e(B'."
54 nil t t t t nil nil nil nil nil t)
56 (thai-generate-quail-map
58 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
59 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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" "
\e,T&
\e(B" "
\e,T8
\e(B" "
\e,Tj
\e(B" "
\e,TN
\e(B" "\"" ; P .. W
81 "\)" "
\e,Tm
\e(B" "\(" "
\e,T:
\e(B" "
\e,T#
\e(B" "
\e,TE
\e(B" "
\e,TY
\e(B" "
\e,Tx
\e(B" ; X .. _
82 "_" "
\e,T?
\e(B" "
\e,TT
\e(B" "
\e,Ta
\e(B" "
\e,T!
\e(B" "
\e,TS
\e(B" "
\e,T4
\e(B" "
\e,T`
\e(B" ; ` .. g
83 "
\e,Ti
\e(B" "
\e,TC
\e(B" "
\e,Th
\e(B" "
\e,TR
\e(B" "
\e,TJ
\e(B" "
\e,T7
\e(B" "
\e,TW
\e(B" "
\e,T9
\e(B" ; h .. o
84 "
\e,TB
\e(B" "
\e,Tf
\e(B" "
\e,T>
\e(B" "
\e,TK
\e(B" "
\e,TP
\e(B" "
\e,TU
\e(B" "
\e,TM
\e(B" "
\e,Td
\e(B" ; p .. w
85 "
\e,T;
\e(B" "
\e,TQ
\e(B" "
\e,T<
\e(B" "
\e,T0
\e(B" "
\e,T%
\e(B" "," "%" 0 ; x .. DEL
89 ;; Thai Pattachote keyboard support.
92 "thai-pattachote" "Thai" "
\e,T!;
\e(B>" t
93 "Thai Pattachote input method with TIS620 keyboard layout"
94 nil t t t t nil nil nil nil nil t)
96 (thai-generate-quail-map
98 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
99 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
100 0 "+" "
\e,T1
\e(B" "/" "," "?" "_" "
\e,T"
\e(B" ; SPC .. '
101 "(" ")" "." "%" "
\e,TP
\e(B" "
\e,Tq
\e(B" "
\e,T(
\e(B" "
\e,T>
\e(B" ; ( .. /
102 "
\e,Tp
\e(B" "=" "
\e,Tr
\e(B" "
\e,Ts
\e(B" "
\e,Tt
\e(B" "
\e,Tu
\e(B" "
\e,TY
\e(B" "
\e,Tw
\e(B" ; 0 .. 7
103 "
\e,T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44b0-88bf-47347bf64825
115 ;;; thai.el ends here