1c Created by Lorna A. Priest, SIL International
2c This keyboard uses deadkeys to access special characters
3c Any changes to be made should be able to be
4c      made in the "stores" rather than in the rules
5c This keyboard was written to normalize to NFC. If you wish to
6c      use NFD then you should go through the keyboard and
7c      remove "use(NFC)"
8c 2009-08-31 LP updated all PUA characters to their official Unicode codepoints
9c      Distributed under X11 license
10c      Added TSF store and rule
11
12NAME "Pan Africa (Deadkeys)"
13VERSION 6.0
14BITMAP AFR.bmp
15HOTKEY  "^+A"
16COPYRIGHT "� 2003-2009 SIL International. Distributed under the X11 free software license (http://scripts.sil.org/X11License)."
17
18begin Unicode > use(MainU)
19
20
21store(&mnemoniclayout) "1"
22
23store(&message) "This keyboard was written to normalize to NFC. " \
24                "If you wish to use NFD then you should go "  \
25                "through the keyboard and remove 'use(NFC)'"
26
27c This new store is a fix for the problem of fast typing reordering keystrokes when using Keyman with TSF
28store(chars) 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=[]\{}|;:",./<>?' "'`~"
29
30c deadkey for first set
31store(K_1)       "["
32
33c deadkey for second set
34store(K_2)       "]"
35
36c reassigned characters (these need to be changed if the above deadkeys are changed)
37store(deadkeys_K) "/"    "<"    ">"    "@"    "["    "]" \
38                  "^"    "_"    "`"    "{"    "|"    "}" \
39                  "~"
40store(deadkeys)   U+002F U+003C U+003E U+0040 U+005B U+005D \
41                  U+005E U+005F U+0060 U+007B U+007C U+007D \
42                  U+007E
43
44
45c using first deadkey
46c                hand a           hook b           hook c           hook d
47c                schwa            hook f           hook g           hook h
48c                bar i            hook d           hook k           ipsilon
49c                left n           eng              open o           hook p
50c                slash o          bar r            epsilon          hook t
51c                bar u            hook v           hook w           gamma
52c                hook y           ezh              glottal          semi-colon
53c                opening chevron  closing chevron
54
55store(K_lc1)     "a"              "b"              "c"              "d" \
56                 "e"              "f"              "g"              "h" \
57                 "i"              "j"              "k"              "l" \
58                 "m"              "n"              "o"              "p" \
59                 "q"              "r"              "s"              "t" \
60                 "u"              "v"              "w"              "x" \
61                 "y"              "z"              "'"
62
63
64store(lc1)       U+0251           U+0253           U+0188           U+0257 \
65                 U+01DD           U+0192           U+0260           U+0266 \
66                 U+0268           U+0256           U+0199           U+0269 \
67                 U+0272           U+014B           U+0254           U+01A5 \
68                 U+00F8           U+024D           U+025B           U+01AD \
69                 U+0289           U+028B           U+2C73           U+0263 \
70                 U+01B4           U+0292           U+02BC
71
72store(K_UC1)     "A"              "B"              "C"              "D" \
73                 "E"              "F"              "G"              "H" \
74                 "I"              "J"              "K"              "L" \
75                 "M"              "N"              "O"              "P" \
76                 "Q"              "R"              "S"              "T" \
77                 "U"              "V"              "W"              "X" \
78                 "Y"              "Z"              "?"
79
80store(UC1)       U+2C6D           U+0181           U+0187           U+018A \
81                 U+018E           U+0191           U+0193           U+021E \
82                 U+0197           U+0189           U+0198           U+0196 \
83                 U+019D           U+014A           U+0186           U+01A4 \
84                 U+00D8           U+024C           U+0190           U+01AC \
85                 U+0244           U+01B2           U+2C72           U+0194 \
86                 U+01B3           U+01B7           U+0294
87
88
89
90c using second deadkey
91c                optional schwa   hook r          esh  \
92c                bar t            upside v        barred z
93c                reverse glottal
94
95store(K_lc2)     "e"              "r"              "s" \
96                 "t"              "v"              "z"
97
98store(lc2)       U+0259           U+027D           U+0283 \
99                 U+0167           U+028C           U+01B6
100
101store(K_UC2)     "E"              "R"              "S" \
102                 "T"              "V"              "Z" \
103                 "?"
104
105store(UC2)       U+018F           U+2C64           U+01A9 \
106                 U+0166           U+0245           U+01B5            \
107                 U+0295
108store(unused2)   "abcdfghijklmnopquwxy" \
109                 "ABCDFGHIJKLMNOPQUWXY"
110
111c DIACRITICS
112store(DAgrave)       U+0300
113store(DAacute)       U+0301
114store(DAcirc)        U+0302
115store(DAtilde)       U+0303
116store(DAmacron)      U+0304
117store(DAdot)         U+0307
118store(DAdiaeresis)   U+0308
119store(DAhachek)      U+030C
120store(DAvert)        U+030D
121store(DAcircle)      U+030A
122store(DUtilde)       U+0330
123store(DUmacron)      U+0331
124store(DUdot)         U+0323
125store(DUvert)        U+0329
126store(DUcircle)      U+0325
127store(DUcedilla)     U+0327
128
129c DIACRITICS - using first deadkey
130c                    grave                  acute                  circumflex
131c                    tilde                  macron                 dot over
132c                    diaeresis              caron                  vert
133c                    ring over
134
135
136store(K_diacritics1) "`"                    "/"                    "^" \
137                     "~"                    "_"                    "}" \
138                     '"'                    "{"                    "|" \
139                     "@"
140
141
142store(diacritics1)   outs(DAgrave)          outs(DAacute)          outs(DAcirc) \
143                     outs(DAtilde)          outs(DAmacron)         outs(DAdot) \
144                     outs(DAdiaeresis)      outs(DAhachek)         outs(DAvert) \
145                     outs(DAcircle)
146
147c DIACRITICS - using second deadkey
148c                    tilde Under            macron Under            dot Under
149c                    vertical Under         ring Under              cedilla
150
151store(K_diacritics2) "~"                    "_"                     "}" \
152                     "|"                    "@"                     ","
153
154
155store(diacritics2)   outs(DUtilde)          outs(DUmacron)          outs(DUdot) \
156                     outs(DUvert)           outs(DUcircle)          outs(DUcedilla)
157
158C Stores used to create composed characters
159store(Vowels)        "a"    "A"    "e"    "E"    "i"    "I"    "o"    "O"    "u"    "U"
160store(graveA)        U+00E0 U+00C0 U+00E8 U+00C8 U+00EC U+00CC U+00F2 U+00D2 U+00F9 U+00D9
161store(acuteA)        U+00E1 U+00C1 U+00E9 U+00C9 U+00ED U+00CD U+00F3 U+00D3 U+00FA U+00DA
162store(circA)         U+00E2 U+00C2 U+00EA U+00CA U+00EE U+00CE U+00F4 U+00D4 U+00FB U+00DC
163store(tildeA)        U+00E3 U+00C3 U+1EBD U+1EBC U+0129 U+0128 U+00F5 U+00D5 U+0169 U+0168
164store(diaeresisA)    U+00E4 U+00C4 U+00EB U+00CB U+00EF U+00CF U+00F6 U+00D6 U+00FC U+00DC
165store(macronA)       U+0101 U+0100 U+0113 U+0112 U+012B U+012A U+014D U+014C U+016B U+016A
166store(hachekA)       U+01CE U+01CD U+011B U+011A U+01D0 U+01CF U+01D2 U+01D1 U+01D4 U+01D3
167store(dotU)          U+1EA1 U+1EA0 U+1EB9 U+1EB8 U+1ECB U+1ECA U+1ECD U+1ECC U+1EE5 U+1EE4
168
169store(circle_K)      "a"    "A"    "u"    "U"
170store(circleA)       U+00E5 U+00C5 U+016F U+016E
171store(circleU_K)     "a"    "A"
172store(circleU)       U+1E01 U+1E00
173store(tildeU_K)      "e"    "E"    "i"    "I"    "u"    "U"
174store(tildeU)        U+1E1B U+1E1A U+1E2D U+1E2C U+1E75 U+1E74
175
176store(dot_K)         "a"    "A"    "b"    "B"    "c"    "C"    "d"    "D"   \
177                     "e"    "E"    "f"    "F"    "g"    "G"    "h"    "H"   \
178                     "m"    "M"    "n"    "N"    "o"    "O"    "p"    "P"   \
179                     "r"    "R"    "s"    "S"    "t"    "T"    "w"    "W"   \
180                     "x"    "X"    "y"    "Y"    "z"    "Z"
181store(dotA)          U+0227 U+0226 U+1E03 U+1E02 U+010B U+010A U+1E0B U+1E0A \
182                     U+0117 U+0116 U+1E1F U+1E1E U+0121 U+0120 U+1E23 U+1E22 \
183                     U+1E41 U+1E40 U+1E45 U+1E44 U+022F U+022E U+1E57 U+1E56 \
184                     U+1E59 U+1E58 U+1E61 U+1E60 U+1E6B U+1E6A U+1E87 U+1E86 \
185                     U+1E8B U+1E8A U+1E8F U+1E8E U+017C U+017B
186store(ConsHachek_K)  "C"    "c"    "D"    "d"    "G"    "g"    "H"    "h"    \
187                     "K"    "k"    "N"    "n"    "R"    "r"    "S"    "s"    \
188                     "T"    "t"    "Z"    "z"    U+01B7 U+0292
189store(ConsHachekA)   U+010C U+010D U+010E U+010F U+01E6 U+01E7 U+021E U+021F \
190                     U+01E8 U+01E9 U+0147 U+0148 U+0158 U+0159 U+0160 U+0161 \
191                     U+0164 U+0165 U+017D U+017E U+01EE U+01EF
192store(ConsMacron_K)  U+00C6 U+00E6 "G"    "g"    "Y"    "y"
193store(ConsMacronA)   U+01E2 U+01E3 U+1E20 U+1E21 U+0232 U+0233
194
195store(ConsGrave_K)   "N"    "n"    "W"    "w"    "Y"    "y"
196store(ConsGraveA)    U+01F8 U+01F9 U+1E80 U+1E81 U+1EF2 U+1EF3
197
198store(ConsAcute_K)   U+00C6 U+00E6 "C"    "c"    U+00C7 U+00E7 "G"    "g"    "K"    "k"    \
199                     "L"    "l"    "M"    "m"    "N"    "n"    U+00D8 U+00F8 "P"    "p"    \
200                     "R"    "r"    "S"    "s"    "W"    "w"    "Y"    "y"    "Z"    "z"
201store(ConsAcuteA)    U+01FC U+01FD U+0106 U+0107 U+1E08 U+1E09 U+01F4 U+01F5 U+1E30 U+1E31 \
202                     U+0139 U+013A U+1E3E U+1E3F U+0143 U+0144 U+01FE U+01FF U+1E54 U+1E55 \
203                     U+0154 U+0155 U+015A U+015B U+1E82 U+1E83 U+00DD U+00FD U+0179 U+017A
204
205store(ConsTilde_K)   "N"    "n"    "V"    "v"    "Y"    "y"
206store(ConsTildeA)    U+00D1 U+00F1 U+1E7C U+1E7D U+1EF8 U+1EF9
207
208store(ConsCirc_K)    "C"    "c"    "G"    "g"    "H"    "h"    "J"    "j"    "S"    "s"    \
209                     "W"    "w"    "Y"    "y"    "Z"    "z"
210store(ConsCircA)     U+0108 U+0109 U+011C U+011D U+0124 U+0125 U+0134 U+0135 U+015C U+015D \
211                     U+0174 U+0175 U+0176 U+0177 U+1E90 U+1E91
212
213store(ConsDiaeresis_K) "H"    "h"    "W"    "w"    "X"    "x"    "Y"    "y"
214store(ConsDiaeresisA)  U+1E26 U+1E27 U+1E84 U+1E85 U+1E8C U+1E8D U+0178 U+00FF
215
216store(cedilla_K)     "c"    "C"    "e"    "E"    "h"    "H"    "s"    "S"    "t"    "T"
217store(cedillaU)      U+00E7 U+00C7 U+0229 U+0228 U+1E29 U+1E28 U+015F U+015E U+0163 U+0162
218
219store(ConsDotU_K)    "B"    "b"    "D"    "d"    "H"    "h"    "K"    "k" \
220                     "L"    "l"    "M"    "m"    "N"    "n"    "R"    "r" \
221                     "S"    "s"    "T"    "t"    "V"    "v"    "W"    "w" \
222                     "Y"    "y"    "Z"    "z"
223store(ConsDotU)      U+1E04 U+1E05 U+1E0C U+1E0D U+1E24 U+1E25 U+1E32 U+1E33 \
224                     U+1E36 U+1E37 U+1E42 U+1E43 U+1E46 U+1E47 U+1E5A U+1E5B \
225                     U+1E62 U+1E63 U+1E6C U+1E6D U+1E7E U+1E7F U+1E88 U+1E89 \
226                     U+1EF4 U+1EF5 U+1E92 U+1E93
227
228store(ConsbarU_K)    "B"    "b"    "D"    "d"    "K"    "k"    "L"    "l" \
229                     "N"    "n"    "R"    "r"    "T"    "t"    "Z"    "z"
230store(ConsbarU)      U+1E06 U+1E07 U+1E0E U+1E0F U+1E34 U+1E35 U+1E3A U+1E3B \
231                     U+1E48 U+1E49 U+1E5E U+1E5F U+1E6E U+1E6F U+1E94 U+1E95
232
233store(StackingBM)     U+00E4 U+00C4 U+00F6 U+00D6 U+00FC U+00DC \
234                      U+0227 U+0226 U+022F U+022E \
235                      U+00F5 U+00D5
236store(StackingMacron) U+01DF U+01DE U+022B U+022A U+01D6 U+01D5 \
237                      U+01E1 U+01E0 U+0231 U+0230 \
238                      U+022D U+022C
239store(StackingBA)     U+0113 U+0112 U+00EF U+00CF U+014D U+014C U+00FC U+00DC \
240                      U+00E5 U+00C5 U+00F5 U+00D5 U+0169 U+0168
241store(StackingAcute)  U+1E17 U+1E16 U+1E2F U+1E2E U+1E53 U+1E52 U+01D8 U+01D7 \
242                      U+01FB U+01FA U+1E4D U+1E4C U+1E79 U+1E78
243
244store(StackingBH)     U+00FC U+00DC
245store(StackingHachek) U+01DA U+01D9
246
247store(StackingBG)     U+0113 U+0112 U+014D U+014C U+00FC U+00DC
248store(StackingGrave)  U+1E15 U+1E14 U+1E51 U+1E50 U+01DC U+01DB
249
250store(StackingBT)     U+00E2 U+00C2 U+00EA U+00CA U+00F4 U+00D4
251store(StackingTilde)  U+1EAB U+1EAA U+1EC5 U+1EC4 U+1ED7 U+1ED6
252store(StackingBDot1)  U+00E2 U+00C2 U+00EA U+00CA U+00F4 U+00D4
253store(StackingBDot2)  U+1EA1 U+1EA0 U+1EB9 U+1EB8 U+1ECD U+1ECC
254store(StackingDot)    U+1EAD U+1EAC U+1EC7 U+1EC6 U+1ED9 U+1ED8
255
256store(StackingBDiar)    U+1E4F U+1E4E U+016B U+016A
257store(StackingDiaresis) U+00F5 U+00D5 U+1E7B U+1E7A
258
259
260c chevron quotation marks. If curly quotes are desired use stores below.
261
262store(opSglQ_K)      "<"
263store(opSglQ)        U+2039
264store(opDblQ)        U+00AB
265store(clSglQ_K)      ">"
266store(clSglQ)        U+203A
267store(clDblQ)        U+00BB
268
269c curly quotation marks.
270store(opSglQ2)       U+2018
271store(opDblQ2)       U+201C
272store(clSglQ2)       U+2019
273store(clDblQ2)       U+201D
274
275c end of STORES
276c ***************************************************
277
278c begin groups
279c ***************************************************
280
281c begin MainU group
282c ***************************************************
283
284
285group(MainU) using keys
286
287c deadkeys
288            + any(K_1)          > dk(1)
289            + any(K_2)          > dk(2)
290
291c reassigned characters
292dk(2)       + any(deadkeys_K)   > index(deadkeys,2)
293
294c PUNCTUATION
295c chevrons
296            + any(opSglQ_K)     > outs(opSglQ) use(Quotes)
297            + any(clSglQ_K)     > outs(clSglQ) use(Quotes)
298c curly quotes
299dk(1)       + any(opSglQ_K)     > outs(opSglQ2) use(Quotes)
300dk(1)       + any(clSglQ_K)     > outs(clSglQ2) use(Quotes)
301
302c special characters - using deadkey
303dk(1)       + any(K_lc1)        > index(lc1,2)
304dk(2)       + any(K_lc2)        > index(lc2,2)
305dk(1)       + any(K_UC1)        > index(UC1,2)
306dk(2)       + any(K_UC2)        > index(UC2,2)
307dk(2)       + any(unused2)      > beep
308
309
310c diacritics - using deadkey
311            + any(K_diacritics1) > index(diacritics1,1) use(NFC)
312dk(1)       + any(K_diacritics2) > index(diacritics2,2) use(NFC)
313
314c housekeeping
315any(graveA)       + [K_BKSP] >  index(Vowels,1)
316any(ConsGraveA)   + [K_BKSP] >  index(ConsGrave_K,1)
317any(acuteA)       + [K_BKSP] >  index(Vowels,1)
318any(ConsAcuteA)   + [K_BKSP] >  index(ConsAcute_K,1)
319any(circA)        + [K_BKSP] >  index(Vowels,1)
320any(ConsCircA)    + [K_BKSP] >  index(ConsCirc_K,1)
321any(tildeA)       + [K_BKSP] >  index(Vowels,1)
322any(ConsTildeA)   + [K_BKSP] >  index(ConsTilde_K,1)
323any(macronA)      + [K_BKSP] >  index(Vowels,1)
324any(ConsMacronA)  + [K_BKSP] >  index(ConsMacron_K,1)
325any(diaeresisA)   + [K_BKSP] >  index(Vowels,1)
326any(ConsDiaeresisA)   + [K_BKSP] >  index(ConsDiaeresis_K,1)
327any(hachekA)      + [K_BKSP] >  index(Vowels,1)
328any(ConsHachekA)  + [K_BKSP] >  index(ConsHachek_K,1)
329any(dotU)         + [K_BKSP] >  index(Vowels,1)
330any(ConsDotU)     + [K_BKSP] >  index(ConsDotU_K,1)
331any(circleA)      + [K_BKSP] >  index(circle_K,1)
332any(circleU)      + [K_BKSP] >  index(circleU_K,1)
333any(tildeU)       + [K_BKSP] >  index(tildeU_K,1)
334any(dotA)         + [K_BKSP] >  index(Dot_K,1)
335any(cedillaU)     + [K_BKSP] >  index(cedilla_K,1)
336any(ConsbarU)     + [K_BKSP] >  index(ConsbarU_K,1)
337any(StackingMacron)   + [K_BKSP] > index(StackingBM,1)
338any(StackingAcute)    + [K_BKSP] > index(StackingBA,1)
339any(StackingHachek)   + [K_BKSP] > index(StackingBH,1)
340any(StackingGrave)    + [K_BKSP] > index(StackingBG,1)
341any(StackingTilde)    + [K_BKSP] > index(StackingBT,1)
342any(StackingDot)      + [K_BKSP] > index(StackingBDot2,1)
343any(StackingDiaresis) + [K_BKSP] > index(StackingBDiar,1)
344
345
346c This new rule is a fix for the problem of fast typing reordering keystrokes when using Keyman with TSF.
347c It apparently must be the last rule in the group.
348
349 + any(chars) > index(chars, 1)
350
351
352c end MainU group
353c ***************************************************
354
355c begin Quotes group
356c ***************************************************
357
358group(Quotes)
359
360any(opSglQ) any(opSglQ)    >     outs(opDblQ)
361any(clSglQ) any(clSglQ)    >     outs(clDblQ)
362any(opSglQ2) any(opSglQ2)  >     outs(opDblQ2)
363any(clSglQ2) any(clSglQ2)  >     outs(clDblQ2)
364
365
366
367c end Quotes group
368c ***************************************************
369
370c begin NFC group
371c ***************************************************
372
373group(NFC)
374
375c Diacritics (single)
376any(Vowels) any(DAgrave)        > index(graveA,1)
377any(ConsGrave_K) any(DAgrave)   > index(ConsGraveA,1)
378
379any(Vowels) any(DAacute)        > index(acuteA,1)
380any(ConsAcute_K) any(DAacute)   > index(ConsAcuteA,1)
381
382any(Vowels) any(DAcirc)         > index(circA,1)
383any(ConsCirc_K) any(DAcirc)     > index(ConsCircA,1)
384
385any(Vowels) any(DAtilde)        > index(tildeA,1)
386any(ConsTilde_K) any(DAtilde)   > index(ConsTildeA,1)
387
388any(Vowels) any(DAmacron)       > index(macronA,1)
389any(ConsMacron_K) any(DAmacron) > index(ConsMacronA,1)
390
391any(Vowels) any(DAdiaeresis)    > index(diaeresisA,1)
392any(ConsDiaeresis_K) any(DAdiaeresis)    > index(ConsDiaeresisA,1)
393
394any(Vowels) any(DAhachek)       > index(hachekA,1)
395any(ConsHachek_K) any(DAhachek) > index(ConsHachekA,1)
396
397any(Vowels) any(DUdot)          > index(dotU,1)
398any(ConsDotU_K) any(DUdot)      > index(ConsDotU,1)
399
400any(circle_K) any(DAcircle)     > index(circleA,1)
401any(circleU_K) any(DUcircle)    > index(circleU,1)
402
403any(tildeU_K) any(DUtilde)      > index(tildeU,1)
404any(dot_K) any(DAdot)           > index(dotA,1)
405any(cedilla_K) any(DUcedilla)   > index(cedillaU,1)
406any(ConsbarU_K) any(DUmacron)   > index(ConsbarU,1)
407
408C Stacking diacritics (multi)
409
410any(StackingBM) any(DAmacron)       > index(StackingMacron,1)
411any(StackingBA) any(DAacute)        > index(StackingAcute,1)
412any(StackingBH) any(DAhachek)       > index(StackingHachek,1)
413any(StackingBG) any(DAgrave)        > index(StackingGrave,1)
414any(StackingBT) any(DAtilde)        > index(StackingTilde,1)
415any(StackingBDot1) any(DUdot)       > index(StackingDot,1)
416any(StackingBDot2) any(DAcirc)      > index(StackingDot,1)
417any(StackingBDiar) any(DAdiaeresis) > index(StackingDiaresis,1)
418
419c end COMPOSITE groups
420c ************************************************************************************
421
422c end groups
423c ************************************************************************************
424
425
426
427
428