1 ;; th-kesmanee-2.mim -- Thai input method with Kesmanee keyboard layout
2 ;; Copyright (C) 2003, 2004, 2005, 2006
3 ;; National Institute of Advanced Industrial Science and Technology (AIST)
4 ;; Registration Number H15PRO112
6 ;; This file is part of the m17n database; a sub-part of the m17n
9 ;; The m17n library is free software; you can redistribute it and/or
10 ;; modify it under the terms of the GNU Lesser General Public License
11 ;; as published by the Free Software Foundation; either version 2.1 of
12 ;; the License, or (at your option) any later version.
14 ;; The m17n library is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ;; Lesser General Public License for more details.
19 ;; You should have received a copy of the GNU Lesser General Public
20 ;; License along with the m17n library; if not, write to the Free
21 ;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24 (input-method th kesmanee-2)
26 (description "Thai input method simulating the Kesmanee keyboard
27 with WTT 2.0 level 2 input sequence correction.
28 The correction algorithm follows the one shown in the following
29 <http://linux.thai.net/~thep/th-xim/>
34 (include (th kesmanee) map)
38 ;; input global variable : arg1, arg2
39 ;; output global variable : ret
44 ;; next = BV1|BV2|BD|AD3|AV1|AV2|AV3, previous = CONS
46 (& (>= arg2 0x0E34) (<= arg2 0x0E3A))
49 ((| (& (>= arg1 0x0E01) (<= arg1 0x0E23))
51 (& (>= arg1 0x0E27) (<= arg1 0x0E2E)))
54 ;; next = TONE, previous = CONS|BV1|BV2|AV1|AV2|AV3
55 ((& (>= arg2 0x0E48) (<= arg2 0x0E4B))
57 ((| (& (>= arg1 0x0E01) (<= arg1 0x0E23))
59 (& (>= arg1 0x0E27) (<= arg1 0x0E2E))
61 (& (>= arg1 0x0E34) (<= arg1 0x0E39)))
64 ;; next = AD1, previous = CONS|BV1|AV1
65 ((& (>= arg2 0x0E4C) (<= arg2 0x0E4D))
67 ((| (& (>= arg1 0x0E01) (<= arg1 0x0E23))
69 (& (>= arg1 0x0E27) (<= arg1 0x0E2E))
74 ;; next = AD2, previous = TONE| AV3
77 ((| (& (>= arg1 0x0E01) (<= arg1 0x0E23))
79 (& (>= arg1 0x0E27) (<= arg1 0x0E2E))
84 ;; input global variable : arg1, arg2
85 ;; output global variable : ret
86 ;; This is Level 2 acceptance.
91 ;; next = CTRL|CONS, previous = *
93 (& (>= arg2 0x0080) (<= arg2 0x009F))
94 (& (>= arg2 0x0E01) (<= arg2 0x0E23))
96 (& (>= arg2 0x0E27) (<= arg2 0x0E2E)))
99 ;; next = NON|LV, previous = ~LV,
100 ((| (& (>= arg2 0x0020) (<= arg2 0x007E))
101 (& (>= arg2 0x00A0) (<= arg2 0x0E00))
103 (& (>= arg2 0x0E3F) (<= arg2 0x0E44))
107 ((| (< arg1 0x0E40) (> arg1 0x0E44))
110 ;; next = FV1, previous = CONS|FV1|FV2|BV1|TONE
111 ((| (= arg2 0x0E30) (= arg2 0x0E32) (= arg2 0x0E33))
113 ((| (& (>= arg1 0x0E01) (<= arg1 0x0E23))
115 (& (>= arg1 0x0E27) (<= arg1 0x0E2E))
121 (& (>= arg1 0x0E48) (<= arg1 0x0E4B)))
124 ;; next = FV2, previous = FV3|TONE
129 (& (>= arg1 0x0E48) (<= arg1 0x0E4B)))
132 ;; next = FV3, previous = ~LV~FV3
133 ((| (= arg2 0x0E24) (= arg2 0x0E26))
135 ((& (| (< arg1 0x0E40) (> arg1 0x0E44))
140 (include (th kesmanee) state)