|
1 /* |
|
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Keymapping data implementation for |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #include <PtiKeyMapData.h> |
|
30 |
|
31 #include <languages.hrh> |
|
32 |
|
33 #include "PtiKeymappings_ITUT_94.h" |
|
34 |
|
35 // |
|
36 // Multitap keymap data table |
|
37 // |
|
38 const TUint16 MultitapData_table_Urdu[] = |
|
39 { |
|
40 0x2e,0x61f,0x3a,0x60c,0x21,0x6f1, |
|
41 0x628,0x67e,0x62a,0x679,0x62b,0x6c3,0x6f2, |
|
42 0x627,0x622,0x624,0x626,0x6d3,0x621,0x6f3, |
|
43 0x633,0x634,0x635,0x636,0x6f4, |
|
44 0x62f,0x688,0x630,0x631,0x691,0x632,0x698,0x6f5, |
|
45 0x62c,0x686,0x62d,0x62e,0x6f6, |
|
46 0x646,0x6ba,0x648,0x6be,0x6c1,0x6c2,0x6cc,0x6d2,0x6f7, |
|
47 0x641,0x642,0x6a9,0x6af,0x644,0x645,0x6f8, |
|
48 0x637,0x638,0x639,0x63a,0x6f9, |
|
49 0x20,0x6f0,0x21b3, |
|
50 0x2e,0x61f,0x3a,0x60c,0x21,0x6f1, |
|
51 0x628,0x67e,0x62a,0x679,0x62b,0x6c3,0x6f2, |
|
52 0x627,0x622,0x624,0x626,0x6d3,0x621,0x6f3, |
|
53 0x633,0x634,0x635,0x636,0x6f4, |
|
54 0x62f,0x688,0x630,0x631,0x691,0x632,0x698,0x6f5, |
|
55 0x62c,0x686,0x62d,0x62e,0x6f6, |
|
56 0x646,0x6ba,0x648,0x6be,0x6c1,0x6c2,0x6cc,0x6d2,0x6f7, |
|
57 0x641,0x642,0x6a9,0x6af,0x644,0x645,0x38, |
|
58 0x637,0x638,0x639,0x63a,0x6f9, |
|
59 0x20,0x30,0x21b3, |
|
60 }; |
|
61 |
|
62 const TInt KMultitapDataSize_Urdu = 124; |
|
63 |
|
64 |
|
65 const TPtiKeyBinding MultitapKeyBindings_table_Urdu[] = |
|
66 { |
|
67 {EPtiKey1, EPtiCaseLower, 0, 6}, |
|
68 {EPtiKey2, EPtiCaseLower, 6, 7}, |
|
69 {EPtiKey3, EPtiCaseLower, 13, 7}, |
|
70 {EPtiKey4, EPtiCaseLower, 20, 5}, |
|
71 {EPtiKey5, EPtiCaseLower, 25, 8}, |
|
72 {EPtiKey6, EPtiCaseLower, 33, 5}, |
|
73 {EPtiKey7, EPtiCaseLower, 38, 9}, |
|
74 {EPtiKey8, EPtiCaseLower, 47, 7}, |
|
75 {EPtiKey9, EPtiCaseLower, 54, 5}, |
|
76 {EPtiKeyStar, EPtiCaseLower, 59, 0}, |
|
77 {EPtiKey0, EPtiCaseLower, 59, 3}, |
|
78 {EPtiKeyHash, EPtiCaseLower, 62, 0}, |
|
79 {EPtiKey1, EPtiCaseUpper, 62, 6}, |
|
80 {EPtiKey2, EPtiCaseUpper, 68, 7}, |
|
81 {EPtiKey3, EPtiCaseUpper, 75, 7}, |
|
82 {EPtiKey4, EPtiCaseUpper, 82, 5}, |
|
83 {EPtiKey5, EPtiCaseUpper, 87, 8}, |
|
84 {EPtiKey6, EPtiCaseUpper, 95, 5}, |
|
85 {EPtiKey7, EPtiCaseUpper, 100, 9}, |
|
86 {EPtiKey8, EPtiCaseUpper, 109, 7}, |
|
87 {EPtiKey9, EPtiCaseUpper, 116, 5}, |
|
88 {EPtiKeyStar, EPtiCaseUpper, 121, 0}, |
|
89 {EPtiKey0, EPtiCaseUpper, 121, 3}, |
|
90 {EPtiKeyHash, EPtiCaseUpper, 124, 0}, |
|
91 }; |
|
92 |
|
93 const TInt KMaxMultitapIndex_Urdu = 24; |
|
94 |
|
95 // |
|
96 // StandardQwerty keymap data table |
|
97 // |
|
98 const TUint16 StandardQwertyData_table_Urdu[] = |
|
99 { |
|
100 0x06f1, |
|
101 0x06f2, |
|
102 0x06f3, |
|
103 0x06f4, |
|
104 0x06f5, |
|
105 0x06f6, |
|
106 0x06f7, |
|
107 0x06f8, |
|
108 0x06f9, |
|
109 0x06f0, |
|
110 0x0637, |
|
111 0x0635, |
|
112 0x06be, |
|
113 0x062f, |
|
114 0x06BB, |
|
115 0x067e, |
|
116 0x062a, |
|
117 0x0628, |
|
118 0x062c, |
|
119 0x062d, |
|
120 0x002d, |
|
121 0x003d, |
|
122 0x0645, |
|
123 0x0648, |
|
124 0x0631, |
|
125 0x0646, |
|
126 0x0644, |
|
127 0x0647, |
|
128 0x0627, |
|
129 0x06a9, |
|
130 0x06cc, |
|
131 0x061b, |
|
132 0x0027, |
|
133 0x005c, |
|
134 0x0642, |
|
135 0x0641, |
|
136 0x06d2, |
|
137 0x0633, |
|
138 0x0634, |
|
139 0x063a, |
|
140 0x0639, |
|
141 0x060c, |
|
142 0x06d4, |
|
143 0x002f, |
|
144 0x0021, |
|
145 0x0040, |
|
146 0x0023, |
|
147 0x0024, |
|
148 0x066a, |
|
149 0x005e, |
|
150 0x0029, |
|
151 0x0028, |
|
152 0x005f, |
|
153 0x002b, |
|
154 0x0638, |
|
155 0x0636, |
|
156 0x0630, |
|
157 0x0688, |
|
158 0x062b, |
|
159 0x067e, |
|
160 0x06c3, |
|
161 0x0628, |
|
162 0x0686, |
|
163 0x062e, |
|
164 0x007d, |
|
165 0x007b, |
|
166 0x0698, |
|
167 0x0632, |
|
168 0x0691, |
|
169 0x06ba, |
|
170 0x06c2, |
|
171 0x0621, |
|
172 0x0622, |
|
173 0x06af, |
|
174 0x064a, |
|
175 0x003a, |
|
176 0x0022, |
|
177 0x002a, |
|
178 0x200d, |
|
179 0x200c, |
|
180 0x06d3, |
|
181 0x200e, |
|
182 0x0624, |
|
183 0x0626, |
|
184 0x200f, |
|
185 0x003e, |
|
186 0x003c, |
|
187 0x061f, |
|
188 }; |
|
189 |
|
190 const TInt KStandardQwertyDataSize_Urdu = 88; |
|
191 |
|
192 |
|
193 const TPtiKeyBinding StandardQwertyKeyBindings_table_Urdu[] = |
|
194 { |
|
195 {EPtiKeyQwerty1, EPtiCaseLower, 0, 1}, |
|
196 {EPtiKeyQwerty2, EPtiCaseLower, 1, 1}, |
|
197 {EPtiKeyQwerty3, EPtiCaseLower, 2, 1}, |
|
198 {EPtiKeyQwerty4, EPtiCaseLower, 3, 1}, |
|
199 {EPtiKeyQwerty5, EPtiCaseLower, 4, 1}, |
|
200 {EPtiKeyQwerty6, EPtiCaseLower, 5, 1}, |
|
201 {EPtiKeyQwerty7, EPtiCaseLower, 6, 1}, |
|
202 {EPtiKeyQwerty8, EPtiCaseLower, 7, 1}, |
|
203 {EPtiKeyQwerty9, EPtiCaseLower, 8, 1}, |
|
204 {EPtiKeyQwerty0, EPtiCaseLower, 9, 1}, |
|
205 {EPtiKeyQwertyPlus, EPtiCaseLower, 10, 1}, |
|
206 {EPtiKeyQwertyQ, EPtiCaseLower, 11, 1}, |
|
207 {EPtiKeyQwertyW, EPtiCaseLower, 12, 1}, |
|
208 {EPtiKeyQwertyE, EPtiCaseLower, 13, 1}, |
|
209 {EPtiKeyQwertyR, EPtiCaseLower, 14, 1}, |
|
210 {EPtiKeyQwertyT, EPtiCaseLower, 15, 1}, |
|
211 {EPtiKeyQwertyY, EPtiCaseLower, 16, 1}, |
|
212 {EPtiKeyQwertyU, EPtiCaseLower, 17, 1}, |
|
213 {EPtiKeyQwertyI, EPtiCaseLower, 18, 1}, |
|
214 {EPtiKeyQwertyO, EPtiCaseLower, 19, 1}, |
|
215 {EPtiKeyQwertyP, EPtiCaseLower, 20, 1}, |
|
216 {EPtiKeyQwertyMinus, EPtiCaseLower, 21, 1}, |
|
217 {EPtiKeyQwertyHash, EPtiCaseLower, 22, 1}, |
|
218 {EPtiKeyQwertyA, EPtiCaseLower, 23, 1}, |
|
219 {EPtiKeyQwertyS, EPtiCaseLower, 24, 1}, |
|
220 {EPtiKeyQwertyD, EPtiCaseLower, 25, 1}, |
|
221 {EPtiKeyQwertyF, EPtiCaseLower, 26, 1}, |
|
222 {EPtiKeyQwertyG, EPtiCaseLower, 27, 1}, |
|
223 {EPtiKeyQwertyH, EPtiCaseLower, 28, 1}, |
|
224 {EPtiKeyQwertyJ, EPtiCaseLower, 29, 1}, |
|
225 {EPtiKeyQwertyK, EPtiCaseLower, 30, 1}, |
|
226 {EPtiKeyQwertyL, EPtiCaseLower, 31, 1}, |
|
227 {EPtiKeyQwertySemicolon, EPtiCaseLower, 32, 1}, |
|
228 {EPtiKeyQwertyApostrophe, EPtiCaseLower, 33, 1}, |
|
229 {EPtiKeyQwertyZ, EPtiCaseLower, 34, 1}, |
|
230 {EPtiKeyQwertyX, EPtiCaseLower, 35, 1}, |
|
231 {EPtiKeyQwertyC, EPtiCaseLower, 36, 1}, |
|
232 {EPtiKeyQwertyV, EPtiCaseLower, 37, 1}, |
|
233 {EPtiKeyQwertyB, EPtiCaseLower, 38, 1}, |
|
234 {EPtiKeyQwertyN, EPtiCaseLower, 39, 1}, |
|
235 {EPtiKeyQwertyM, EPtiCaseLower, 40, 1}, |
|
236 {EPtiKeyQwertyComma, EPtiCaseLower, 41, 1}, |
|
237 {EPtiKeyQwertyFullstop, EPtiCaseLower, 42, 1}, |
|
238 {EPtiKeyQwertySlash, EPtiCaseLower, 43, 1}, |
|
239 {EPtiKeyQwerty1, EPtiCaseUpper, 44, 1}, |
|
240 {EPtiKeyQwerty2, EPtiCaseUpper, 45, 1}, |
|
241 {EPtiKeyQwerty3, EPtiCaseUpper, 46, 1}, |
|
242 {EPtiKeyQwerty4, EPtiCaseUpper, 47, 1}, |
|
243 {EPtiKeyQwerty5, EPtiCaseUpper, 48, 1}, |
|
244 {EPtiKeyQwerty6, EPtiCaseUpper, 49, 1}, |
|
245 {EPtiKeyQwerty7, EPtiCaseUpper, 50, 1}, |
|
246 {EPtiKeyQwerty8, EPtiCaseUpper, 51, 1}, |
|
247 {EPtiKeyQwerty9, EPtiCaseUpper, 52, 1}, |
|
248 {EPtiKeyQwerty0, EPtiCaseUpper, 53, 1}, |
|
249 {EPtiKeyQwertyPlus, EPtiCaseUpper, 54, 1}, |
|
250 {EPtiKeyQwertyQ, EPtiCaseUpper, 55, 1}, |
|
251 {EPtiKeyQwertyW, EPtiCaseUpper, 56, 1}, |
|
252 {EPtiKeyQwertyE, EPtiCaseUpper, 57, 1}, |
|
253 {EPtiKeyQwertyR, EPtiCaseUpper, 58, 1}, |
|
254 {EPtiKeyQwertyT, EPtiCaseUpper, 59, 1}, |
|
255 {EPtiKeyQwertyY, EPtiCaseUpper, 60, 1}, |
|
256 {EPtiKeyQwertyU, EPtiCaseUpper, 61, 1}, |
|
257 {EPtiKeyQwertyI, EPtiCaseUpper, 62, 1}, |
|
258 {EPtiKeyQwertyO, EPtiCaseUpper, 63, 1}, |
|
259 {EPtiKeyQwertyP, EPtiCaseUpper, 64, 1}, |
|
260 {EPtiKeyQwertyMinus, EPtiCaseUpper, 65, 1}, |
|
261 {EPtiKeyQwertyHash, EPtiCaseUpper, 66, 1}, |
|
262 {EPtiKeyQwertyA, EPtiCaseUpper, 67, 1}, |
|
263 {EPtiKeyQwertyS, EPtiCaseUpper, 68, 1}, |
|
264 {EPtiKeyQwertyD, EPtiCaseUpper, 69, 1}, |
|
265 {EPtiKeyQwertyF, EPtiCaseUpper, 70, 1}, |
|
266 {EPtiKeyQwertyG, EPtiCaseUpper, 71, 1}, |
|
267 {EPtiKeyQwertyH, EPtiCaseUpper, 72, 1}, |
|
268 {EPtiKeyQwertyJ, EPtiCaseUpper, 73, 1}, |
|
269 {EPtiKeyQwertyK, EPtiCaseUpper, 74, 1}, |
|
270 {EPtiKeyQwertyL, EPtiCaseUpper, 75, 1}, |
|
271 {EPtiKeyQwertySemicolon, EPtiCaseUpper, 76, 1}, |
|
272 {EPtiKeyQwertyApostrophe, EPtiCaseUpper, 77, 1}, |
|
273 {EPtiKeyQwertyZ, EPtiCaseUpper, 78, 1}, |
|
274 {EPtiKeyQwertyX, EPtiCaseUpper, 79, 1}, |
|
275 {EPtiKeyQwertyC, EPtiCaseUpper, 80, 1}, |
|
276 {EPtiKeyQwertyV, EPtiCaseUpper, 81, 1}, |
|
277 {EPtiKeyQwertyB, EPtiCaseUpper, 82, 1}, |
|
278 {EPtiKeyQwertyN, EPtiCaseUpper, 83, 1}, |
|
279 {EPtiKeyQwertyM, EPtiCaseUpper, 84, 1}, |
|
280 {EPtiKeyQwertyComma, EPtiCaseUpper, 85, 1}, |
|
281 {EPtiKeyQwertyFullstop, EPtiCaseUpper, 86, 1}, |
|
282 {EPtiKeyQwertySlash, EPtiCaseUpper, 87, 1}, |
|
283 }; |
|
284 |
|
285 const TInt KMaxStandardQwertyIndex_Urdu = 88; |
|
286 |
|
287 |
|
288 // |
|
289 // Numeric key data table for StandardQwerty |
|
290 // |
|
291 const TPtiNumericKeyBinding StandardQwertyNumericKeysData_table_Urdu[] = |
|
292 { |
|
293 {'*',EPtiKeyQwerty7,EPtiCaseUpper}, |
|
294 {'p',EPtiKeyQwertyP,EPtiCaseLower}, |
|
295 {'w',EPtiKeyQwertyW,EPtiCaseLower}, |
|
296 {'1',EPtiKeyQwerty1,EPtiCaseLower}, |
|
297 {'2',EPtiKeyQwerty2,EPtiCaseLower}, |
|
298 {'3',EPtiKeyQwerty3,EPtiCaseLower}, |
|
299 {'4',EPtiKeyQwerty4,EPtiCaseLower}, |
|
300 {'5',EPtiKeyQwerty5,EPtiCaseLower}, |
|
301 {'6',EPtiKeyQwerty6,EPtiCaseLower}, |
|
302 {'7',EPtiKeyQwerty7,EPtiCaseLower}, |
|
303 {'8',EPtiKeyQwerty8,EPtiCaseLower}, |
|
304 {'9',EPtiKeyQwerty9,EPtiCaseLower}, |
|
305 {'0',EPtiKeyQwerty0,EPtiCaseLower}, |
|
306 {';',EPtiKeyQwertySemicolon,EPtiCaseLower}, |
|
307 {'.',EPtiKeyQwertyFullstop,EPtiCaseLower}, |
|
308 {',',EPtiKeyQwertyComma,EPtiCaseLower}, |
|
309 {'E',EPtiKeyQwertyE,EPtiCaseUpper}, |
|
310 {'?',EPtiKeyQwertySlash,EPtiCaseUpper}, |
|
311 }; |
|
312 |
|
313 const TInt KNumStandardQwertyNumericKeysEntries_Urdu = 18; |
|
314 // |
|
315 // Class implementation. |
|
316 // |
|
317 |
|
318 CPtiLangDataImplUrdu* CPtiLangDataImplUrdu::NewL() |
|
319 { |
|
320 return new (ELeave) CPtiLangDataImplUrdu(); |
|
321 } |
|
322 |
|
323 |
|
324 TInt CPtiLangDataImplUrdu::LanguageCode() const |
|
325 { |
|
326 return ELangUrdu; |
|
327 } |
|
328 |
|
329 |
|
330 const TUint16* CPtiLangDataImplUrdu::KeyData(TPtiKeyboardType aKeyboardType, TInt& aDataSize) const |
|
331 { |
|
332 if (aKeyboardType == EPtiKeyboard12Key) |
|
333 { |
|
334 aDataSize = KMultitapDataSize_Urdu; |
|
335 return MultitapData_table_Urdu; |
|
336 } |
|
337 if (aKeyboardType == EPtiKeyboardQwerty4x12) |
|
338 { |
|
339 aDataSize = KStandardQwertyDataSize_Urdu; |
|
340 return StandardQwertyData_table_Urdu; |
|
341 } |
|
342 |
|
343 aDataSize = 0; |
|
344 return NULL; |
|
345 } |
|
346 |
|
347 |
|
348 const TPtiKeyBinding* CPtiLangDataImplUrdu::KeyBindingTable(TPtiKeyboardType aKeyboardType, TInt& aNumItems) const |
|
349 { |
|
350 if (aKeyboardType == EPtiKeyboard12Key) |
|
351 { |
|
352 aNumItems = KMaxMultitapIndex_Urdu; |
|
353 return MultitapKeyBindings_table_Urdu; |
|
354 } |
|
355 if (aKeyboardType == EPtiKeyboardQwerty4x12) |
|
356 { |
|
357 aNumItems = KMaxStandardQwertyIndex_Urdu; |
|
358 return StandardQwertyKeyBindings_table_Urdu; |
|
359 } |
|
360 |
|
361 aNumItems = 0; |
|
362 return NULL; |
|
363 } |
|
364 |
|
365 |
|
366 const TPtiNumericKeyBinding* CPtiLangDataImplUrdu::NumericModeKeysTable(TPtiKeyboardType aKeyboardType, TInt& aNumEntries) const |
|
367 { |
|
368 if (aKeyboardType == EPtiKeyboardQwerty4x12) |
|
369 { |
|
370 aNumEntries = KNumStandardQwertyNumericKeysEntries_Urdu; |
|
371 return StandardQwertyNumericKeysData_table_Urdu; |
|
372 } |
|
373 |
|
374 aNumEntries = 0; |
|
375 return NULL; |
|
376 } |
|
377 |
|
378 |
|
379 |
|
380 TBool CPtiLangDataImplUrdu::SuitableForLatinOnlyMode() const |
|
381 { |
|
382 return EFalse; |
|
383 } |
|
384 |
|
385 |