-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathmyWin.kms
291 lines (280 loc) · 13.5 KB
/
myWin.kms
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
// Burmese Keyboard for Unicode Encoding.
// Derived from an original by MJP Hoskens (SIL)
//
// This Layout has been designed to resemble that used by WinMyanmar Systems
// in their non-Unicode fonts. However, it is much simplified because of the
// advantages of Unicode technology. Some keys have changed as a result.
//
// Copyright (C) 2004,2008, 2009 Keith Stribley, www.thanlwinsoft.org
// Martin Hosken, SIL International
// Bugs/Comments: <mailto:[email protected]>
// Distributable under the terms of the GNU Lesser General Public License,
// either version 2.1 of the License, or (at your option) any later version.
// http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
//
// Thant Thet Khin Zaw - 14-Nov-2009 - Converted into KeyMagic Keyboard
// Thant Thet Khin Zaw - 10-March-2011 - Tweak rules to have smaller layout file for jKeyMagic
/*
@NAME = "my-Win 2.3.0 Unicode 5.2"
@ICON = "myWin.png"
@HOTKEY = "CTRL+ALT+W"
@FONTFAMILY = "Myanmar3"
Copyright = "? 2004-2009 SIL & ThanLwinSoft.org (License: LGPL)"
@DESCRIPTION = "Myanmar keyboard for typing Burmese with Unicode 5.2.0." + \
<http://www.unicode.org/versions/Unicode5.2.0/>." + \
This keyboard is freely redistributable under the terms of the GNU Lesser General Public License."
*/
// qwertyuiop[ is same as Win
// asdfghjkl; is same as Win
// zxcvbm is same as Win
// currently _ is mapped to * but it is multiply in Win
// , is U101A in both Win and here. ',' is < here
// in Win 'P' is U100F, here at 'E' - Win's E is not needed anymore
// W is now U101D - the symbol in Win at this position is not used
// and includes U101D anyway
// Duplicates/macros that aren't strictly necessary EKL:F$|
// The medials are also can be created using stacking: GjsS
// Pali characters that might need a location: U1050-1059
// Some of the characters <.}]^ could be changed to make room
// Should U101B, U1002 be moved somewhere more accessible e.g. R,U rather than &,*?
$baseK = 'qwertyui' +\
"op['zxc" +\
'vbn,./' +\
'QWERTY' +\
'UIOP{A"' +\
'ZXCVBNM?' +\
'-=!@#%^&' +\
'*()_+' +\
'\\]}<>`~'
$baseU = U1006 + U1010 + U1014 + U1019 + U1021 + U1015 + U1000 + U1004 + \
U101E + U1005 + U101F + U1012 + U1016 + U1011 + U1001 + \
U101C + U1018 + U100A + U101A + U002E + U104B + \
U1029 + U101D + U103F + U1023 + U1024 + U104C + \
U1009 + U104D + U1025 + U100F + U1027 + U1017 + U1013 + \
U1007 + U100C + U1003 + U1020 + U1026 + U1008 + U102A + U104A + \
U002D + U003D + U100D + U100E + U100B + U0025 + U002F + U101B + \
U1002 + U0028 + U0029 + U005F + U002B + \
U104F + U2018 + U2019 + U002C + U104E + U25CC + U2060
$numK = '1234567890'
$numU = U1041 + U1042 + U1043 + U1044 + U1045 + U1046 + U1047 + U1048 + U1049 + \
U1040
// Some numbers can be used incorrectly as letters
$numOrLetK = '078'
$numOrLetU = U1040 + U1047 + U1048
$numAsLetU = U101D + U101B + U1002
$aftereK = 'mgh;'
$aftereU = U102C + U102B + U1037 + U1038
// sub units of aftereK
$aaK = 'mg'
$aaU = U102C + U102B
$lDotK = 'h'
$lDotU = U1037
$visargaK = ';'
$visargaU = U1038
$udiaK = 'dDJKL'
$udiaU = U102D + U102E + U1032 + U102F + U1030
$ldiaK = 'kl'
$ldiaU = U102F + U1030
$aftereDK = 'f'
$aftereDU = U103A
$currencyK = '$'
// 25cc is added here to allow it to be used to show stand alone diacritics
$consU = U1000 + U1001 + U1002 + U1003 + U1005 + U1006 + U1007 + \
U1008 + U1009 + U100A + U100B + U100C + U100D + U100E + U100F + \
U1010 + U1011 + U1012 + U1013 + U1014 + U1015 + U1016 + U1017 + \
U1018 + U1019 + U101A + U101B + U101C + U101D + U101E + U101F + \
U1020 + U1021 + U25CC
$consK = 'uc*CpqZ' +\
'NUn#X!@P' +\
"wx'" +\
'"eyzAbr,&vWo[' +\
'Vt'
$sdiaK = 'sjSG'
$sdiaU = U103B + U103C + U103E + U103D
$diaU = $sdiaU + $udiaU + $ldiaU + U1031 + U1036
// split up diacritics - user shouldn't need to know canonical order
// Y/R should be first and can't come together
$yDiaU = U103B
$rDiaU = U103C
$wDiaU = U103D
$hDiaU = U103E
$yrDiaU = U103B + U103C
$yrwDiaU = U103B + U103C + U103D
$yDiaK = 's'
$rDiaK = 'j'
$hDiaK = 'S'
$wDiaK = 'G'
$yrDiaK = $yDiaK + $rDiaK
$m1DiaK = 's'
$m2DiaK = 'sj'
// $m3DiaK = 'sj_'
$m4DiaK = 'sjG'
$m5DiaK = 'sjGS'
$mDia = U103B + U103C + U103D + U103E
// this is a weired stacked combination of 100B,100C
$ttatthaK = '|'
// U200B + causes problems in OpenOffice, but Padauk now removes 200C/D,
// so it doesn't have correct effect
$filler = U200B
// F is Kinzi - it should be possible to create a Kinzi
$kinziK = 'F'
$kinziU = U1004
$vowelEK = 'a'
$vowelEU = U1031
// create some classes for diacritics that might have been
// sensibly typed before the user types the medial
$allDiaU = U1031 + U102F + U1030 + U102D + U1032 + U1036 + U1037
// only a subset can correctly occur together
// (U1031 + U1037) (U102D + U102F)
// (U102F + U1036) (U1032 + U1037) (U102D + U1036)
$firstDiaU = U1031 + U102D + U102F + U1032
$secondDiaU = U102F + U1036 + U1037
// It is possible for U102F + U102D + U1037 + to occur,
// but in this case its fairly obvious to type the medials
// before the final U1037
$stackK = '`'
$stackU = U1039
// Deal with vowel E before consonant
$vowelEK[*] => $filler + $vowelEU
// stacker key
U1025 + $consU[*] + $stackK[*] => U1009 + $stackU + $consU[$2]
U1025 + $numOrLetU[*] + $stackK[*] => U1009 + $stackU + $numOrLetU[$2]
$consU[*] + $stackK[*] => $stackU + $consU[$1]
$numOrLetU[*] + $stackK[*] => $stackU + $numAsLetU[$1]
$numOrLetU[*] + $consU[*] + $stackK[*] => $numAsLetU[$1] + $stackU + $consU[$2]
$numOrLetU[*] + $numOrLetU[*] + $stackK[*] => $numAsLetU[$1] + $stackU + $numAsLetU[$2]
// rearrange vowel E to behind consonant in stacking situation
// U1031 + U101E + U101E + $stackK[*] => U103F + U1031
U1031 + $consU[*] + $stackK[*] => $stackU + $consU[$2] + U1031
U1005 + U1031 + $yDiaK[*] => U1008 + U1031
// modify space keys
<VK_SHIFT & VK_SPACE> => U200B
// Convert sequences for composite vowels into single code point
U101E + U103C + U1031 + U102c + $aftereDK[*] => U102A
U101E + 'j' => U1029
U1025 + 'D' => U1026
// users usually type u-tha when they mean nya child tha
U1025 + 'f' => U1009 + U103A
U1025 + 'm' => U1009 + U102C
$numOrLetU[*] + 'm' => $numAsLetU[$1] + U102C
$numOrLetU[*] + 'g' => $numAsLetU[$1] + U102B
$numOrLetU[*] + 'f' => $numAsLetU[$1] + U103A
$numOrLetU[*] + 'H' => $numAsLetU[$1] + U1036
U1044 + U1004 + U103A + ';' => U104E + U1004 + U103A + U1038
$numOrLetU[*] + U1004 + 'f' => $numAsLetU[$1] + U1004 + U103A
$numOrLetU[*] + $consU[*] + 'f' => $numAsLetU[$1] + $consU[$2] + U103A
$numOrLetU[*] + $numOrLetU[*] + 'f' => $numAsLetU[$1] + $numAsLetU[$2] + U103A
$numK[*] => $numU[$1]
$baseK[*] => $baseU[$1]
$aftereK[*] => $aftereU[$1]
$filler[*] + U1031 + $numOrLetK[*] => $numAsLetU[$3] + U1031
$filler[*] + U1031 + $baseK[*] => $baseU[$3] + U1031
$filler[*] + U1031 + $ttatthaK[*] => U100B + U1039 + U100C + U1031
// $filler[*] + U1031 + $baseK[*] => U1031 + U25CC + $baseU[$3]
// these allow the user to type upper and lower diacritics in
// any order, but to still get the storage right
$udiaU[*] + U1037 + $ldiaK[*] => $udiaU[$1] + $ldiaU[$3] + U1037
$ldiaU[*] + U1037 + $udiaK[*] => $udiaU[$3] + $1 + $2
U1037 + $udiaK[*] => $udiaU[$2] + $1
U1037 + $ldiaK[*] => $ldiaU[$2] + $1
'H' => U1036
U1036 + $udiaK[*] => $udiaU[$2] + $1
$ldiaU[*] + U1036 + $udiaK[*] => $udiaU[$3] + $1 + $2
U1036 + $ldiaK[*] => $ldiaU[$2] + $1
// it is unlikely that other combinations will occur with U1037
// and aa so this rules are probably OK
U1037 + $aaK[*] => $aaU[$2] + $1
// allow tone marks to be typed in either order
U1038 + $lDotK[*] => $lDotU[$2] + $1
U103A + U1038 + $lDotK[*] => $lDotU[$3] + $1 + $2
U1037 + 'H' => U1036 + U1037
// $udiaU[*] + $ldiaK[*] => $ldiaU[$2] + context
$ldiaU[*] + $udiaK[*] => $udiaU[$2] + $1
$numOrLetU[*] + $ldiaK[*] => $numAsLetU[$1] + $ldiaU[$2]
$numOrLetU[*] + $udiaK[*] => $numAsLetU[$1] + $udiaU[$2]
$ldiaK[*] => $ldiaU[$1]
$udiaK[*] => $udiaU[$1]
$ttatthaK[*] => U100B + U1039 + U100C
$currencyK[*] => U1000 + U103B + U1015 + U103A
':' => U102B + U103A
// now deal with the medials, need to arrange order appropriately
// most complicated is when all 3 medials are together but out of order
$rDiaU[*] + $ldiaU[*] + $wDiaU[*] + $hDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $m1DiaK[*] => $mDia[$7] + $1 + $2 + $3 + $4 + $5 + $6
$rDiaU[*] + $ldiaU[*] + $wDiaU[*] + $hDiaU[*] + $firstDiaU[*] + $m1DiaK[*] => $mDia[$6] + $1 + $2 + $3 + $4 + $5
$rDiaU[*] + $ldiaU[*] + $wDiaU[*] + $hDiaU[*] + $m1DiaK[*] => $mDia[$5] + $1 + $2 + $3 + $4
$ldiaU[*] + $wDiaU[*] + $hDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $m2DiaK[*] => $mDia[$6] + $1 + $2 + $3 + $4 + $5
$ldiaU[*] + $wDiaU[*] + $hDiaU[*] + $firstDiaU[*] + $m2DiaK[*] => $mDia[$5] + $1 + $2 + $3 + $4
$ldiaU[*] + $wDiaU[*] + $hDiaU[*] + $m2DiaK[*] => $mDia[$4] + $1 + $2 + $3
$wDiaU[*] + $hDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $m2DiaK[*] => $mDia[$5] + $1 + $2 + $3 + $4
$wDiaU[*] + $hDiaU[*] + $firstDiaU[*] + $m2DiaK[*] => $mDia[$4] + $1 + $2 + $3
$wDiaU[*] + $hDiaU[*] + $m2DiaK[*] => $mDia[$3] + $1 + $2
$hDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $m4DiaK[*] => $mDia[$4] + $1 + $2 + $3
$hDiaU[*] + $firstDiaU[*] + $m4DiaK[*] => $mDia[$3] + $1 + $2
$hDiaU[*] + $m4DiaK[*] => $mDia[$2] + $1
// expand full context of syllable
$consU[*] + $wDiaU[*] + $hDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $m2DiaK[*] =>\
$1 + $mDia[$6] + $2 + $3 + $4 + $5
$consU[*] + $wDiaU[*] + $hDiaU[*] + $firstDiaU[*] + $m2DiaK[*] => \
$1 + $mDia[$5] + $2 + $3 + $4
$consU[*] + $wDiaU[*] + $hDiaU[*] + $m2DiaK[*] => \
$1 + $mDia[$4] + $2 + $3
$consU[*] + $wDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $m2DiaK[*] =>\
$1 + $mDia[$5] + $2 + $3 + $4
$consU[*] + $wDiaU[*] + $firstDiaU[*] + $m2DiaK[*] => \
$1 + $mDia[$4] + $2 + $3
$consU[*] + $yrwDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $hDiaK[*] => \
$1 + $2 + $hDiaU[$5] + $3 + $4
$consU[*] + $yrwDiaU[*] + $firstDiaU[*] + $hDiaK[*] => \
$1 + $2 + $hDiaU[$4] + $3
$consU[*] + $wDiaU[*] + $yrDiaK[*] => $1 + $yrDiaU[$3] + $2
$consU[*] + $hDiaU[*] + $yrDiaK[*] => $1 + $yrDiaU[$3] + $2
$consU[*] + $hDiaU[*] + $wDiaK[*] => $1 + $wDiaU[$3] + $2
$consU[*] + $wDiaU[*] + $hDiaU[*] + $yrDiaK[*] => $1 + $yrDiaU[$4] + $2 + $3
$consU[*] + $yrDiaU[*] + $hDiaU[*] + $wDiaK[*] => $1 + $2 + $wDiaU[$4] + $3
$consU[*] + $yrDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $wDiaK[*] => \
$1 + $2 + $wDiaU[$5] + $3 + $4
$consU[*] + $yrDiaU[*] + $firstDiaU[*] + $wDiaK[*] => \
$1 + $2 + $wDiaU[$4] + $3
$consU[*] + $hDiaU[*] + $firstDiaU[*] + $secondDiaU[*] + $m4DiaK[*] => \
$1 + $mDia[$5] + $2 + $3 + $4
$consU[*] + $hDiaU[*] + $firstDiaU[*] + $m4DiaK[*] => \
$1 + $mDia[$4] + $2 + $3
$consU[*] + $hDiaU[*] + $m4DiaK[*] => \
$1 + $mDia[$3]
$consU[*] + $firstDiaU[*] + $secondDiaU[*] + $m5DiaK[*] => $1 + $mDia[$4] + $2 + $3
$consU[*] + $firstDiaU[*] + $m5DiaK[*] => $1 + $mDia[$3] + $2
$firstDiaU[*] + $secondDiaU[*] + $m5DiaK[*] => $mDia[$3] + $1 + $2
$firstDiaU[*] + $m5DiaK[*] => $mDia[$2] + $1
$m5DiaK[*] => $mDia[$1]
// contractions
$consU[*] + $mDia[*] + $aftereDK[*] => $1 + $aftereDU[$3] + $2
$firstDiaU[*] + $secondDiaU[*] + $sdiaK[*] => $sdiaU[$3] + $1 + $2
$allDiaU[*] + $sdiaK[*] => $sdiaU[$2] + $1
$numOrLetU[*] + $sdiaK[*] => $1 + $sdiaU[$2]
U1005 + 's' => U1008
$sdiaK[*] => $sdiaU[$1]
$aftereDK[*] => $aftereDU[$1]
// Normalization of 1037 and 103a
$aftereDU[*] + $lDotK[*] => $lDotU[$2] + $1
U1038 + $aftereDK[*] => $aftereDU[$2] + $1
$kinziK[*] => $kinziU[$1] + U103A + U1039
$consU[*] + $kinziK[*] => $kinziU[$2] + U103A + U1039 + $1
U104E + $kinziK[*] => $kinziU[$2] + U103A + U1039 + U104E
$numOrLetU[*] + $kinziK[*] => $kinziU[$2] + U103A + U1039 + $1
$numU[*] + $kinziK[*] => $kinziU[$2] + U103A + U1039 + $1
$consU[*] + U1039 + $consU[*] + $kinziK[*] => $kinziU[$4] + U103A + U1039 + $1 + $2 + $3
$consU[*] + U1039 + $consU[*] + $diaU[*] + $kinziK[*] => $kinziU[$5] + U103A + U1039 + $1 + $2 + $3 + $4
$consU[*] + U1039 + $consU[*] + $diaU[*] + $diaU[*] + $kinziK[*] => $kinziU[$6] + U103A + U1039 + $1 + $2 + $3 + $4 + $5
$consU[*] + $mDia[*] + $kinziK[*] => $kinziU[$3] + U103A + U1039 + $1 + $2
$consU[*] + $diaU[*] + $kinziK[*] => $kinziU[$3] + U103A + U1039 + $1 + $2
$consU[*] + $diaU[*] + $diaU[*] + $kinziK[*] => $kinziU[$4] + U103A + U1039 + $1 + $2 + $3
$consU[*] + $diaU[*] + $diaU[*] + $diaU[*] + $kinziK[*] => $kinziU[$5] + U103A + U1039 + $1 + $2 + $3 + $4
$consU[*] + $diaU[*] + $diaU[*] + $diaU[*] + $diaU[*] + $kinziK[*] => $kinziU[$6] + U103A + U1039 + $1 + $2 + $3 + $4 + $5
$filler[*] + U1031 + < VK_BACK > => NULL
$baseU[*] + U1031 + < VK_BACK > => $filler + U1031
$mDia[*] + U1031 + < VK_BACK > => U1031
U1004 + U103A + U1039 + $consU[*] + < VK_BACK > => $4
U1004 + U103A + U1039 + $consU[*] + U1031 + < VK_BACK > => $4 + U1031
U1039 + $consU[*] + U1031 + < VK_BACK > => U1031
U1039 + $consU[*] + < VK_BACK > => NULL
U1037 + U103A + < VK_BACK > => U103A