textinput/ptienginev2/languages/PtiKeymappings_ITUT_157.cpp
branchRCL_3
changeset 11 c8fb4cf7b3ae
equal deleted inserted replaced
9:e6a39382bb9c 11:c8fb4cf7b3ae
       
     1 /*
       
     2 * Copyright (c) 2007 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 the License "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_157.h"
       
    34 
       
    35 //
       
    36 // Multitap keymap data table
       
    37 //
       
    38 const TUint16 MultitapData_table_English_Taiwan[] =
       
    39     {
       
    40      0x2e,0x2c,0x3f,0x21,0x31,0x40,0x27,0x2d,0x5f,0x28,0x29,0x3a,0x3b,0x26,0x2f,0x25,0x2a,0x23,0x2b,0x3c,0x3d,0x3e,0x22,0x24,0xa3,0xa7,0xa5,0xa4,0xa1,0xbf,
       
    41      0x61,0x62,0x63,0x32,0xe4,0xe6,0xe5,0xe0,0xe1,0xe2,0xe3,0xe7,
       
    42      0x64,0x65,0x66,0x33,0xe8,0xe9,0xea,0xeb,0xf0,
       
    43      0x67,0x68,0x69,0x34,0xec,0xed,0xee,0xef,
       
    44      0x6a,0x6b,0x6c,0x35,0xa3,
       
    45      0x6d,0x6e,0x6f,0x36,0xf6,0xf8,0xf2,0xf3,0xf4,0xf5,0xf1,
       
    46      0x70,0x71,0x72,0x73,0x37,0xdf,0x24,
       
    47      0x74,0x75,0x76,0x38,0xf9,0xfa,0xfb,0xfc,
       
    48      0x77,0x78,0x79,0x7a,0x39,0xfd,0xfe,
       
    49      0x20,0x30,0x21b2,
       
    50      0x2e,0x2c,0x3f,0x21,0x31,0x40,0x27,0x2d,0x5f,0x28,0x29,0x3a,0x3b,0x26,0x2f,0x25,0x2a,0x23,0x2b,0x3c,0x3d,0x3e,0x22,0x24,0xa3,0xa7,0xa5,0xa4,0xa1,0xbf,
       
    51      0x41,0x42,0x43,0x32,0xc4,0xc6,0xc5,0xc0,0xc1,0xc2,0xc3,0xc7,
       
    52      0x44,0x45,0x46,0x33,0xc8,0xc9,0xca,0xcb,0xd0,
       
    53      0x47,0x48,0x49,0x34,0xcc,0xcd,0xce,0xcf,
       
    54      0x4a,0x4b,0x4c,0x35,0xa3,
       
    55      0x4d,0x4e,0x4f,0x36,0xd6,0xd8,0xd2,0xd3,0xd4,0xd5,0xd1,
       
    56      0x50,0x51,0x52,0x53,0x37,0x24,
       
    57      0x54,0x55,0x56,0x38,0xd9,0xda,0xdb,0xdc,
       
    58      0x57,0x58,0x59,0x5a,0x39,0xdd,0xde,
       
    59      0x20,0x30,0x21b2,
       
    60     };
       
    61 
       
    62 const TInt KMultitapDataSize_English_Taiwan = 199;
       
    63 
       
    64 
       
    65 const TPtiKeyBinding MultitapKeyBindings_table_English_Taiwan[] =
       
    66     {
       
    67         {EPtiKey1, EPtiCaseLower, 0, 30},
       
    68         {EPtiKey2, EPtiCaseLower, 30, 12},
       
    69         {EPtiKey3, EPtiCaseLower, 42, 9},
       
    70         {EPtiKey4, EPtiCaseLower, 51, 8},
       
    71         {EPtiKey5, EPtiCaseLower, 59, 5},
       
    72         {EPtiKey6, EPtiCaseLower, 64, 11},
       
    73         {EPtiKey7, EPtiCaseLower, 75, 7},
       
    74         {EPtiKey8, EPtiCaseLower, 82, 8},
       
    75         {EPtiKey9, EPtiCaseLower, 90, 7},
       
    76         {EPtiKeyStar, EPtiCaseLower, 97, 0},
       
    77         {EPtiKey0, EPtiCaseLower, 97, 3},
       
    78         {EPtiKeyHash, EPtiCaseLower, 100, 0},
       
    79         {EPtiKey1, EPtiCaseUpper, 100, 30},
       
    80         {EPtiKey2, EPtiCaseUpper, 130, 12},
       
    81         {EPtiKey3, EPtiCaseUpper, 142, 9},
       
    82         {EPtiKey4, EPtiCaseUpper, 151, 8},
       
    83         {EPtiKey5, EPtiCaseUpper, 159, 5},
       
    84         {EPtiKey6, EPtiCaseUpper, 164, 11},
       
    85         {EPtiKey7, EPtiCaseUpper, 175, 6},
       
    86         {EPtiKey8, EPtiCaseUpper, 181, 8},
       
    87         {EPtiKey9, EPtiCaseUpper, 189, 7},
       
    88         {EPtiKeyStar, EPtiCaseUpper, 196, 0},
       
    89         {EPtiKey0, EPtiCaseUpper, 196, 3},
       
    90         {EPtiKeyHash, EPtiCaseUpper, 199, 0},
       
    91     };
       
    92 
       
    93 const TInt KMaxMultitapIndex_English_Taiwan = 24;
       
    94 
       
    95 //
       
    96 // StandardQwerty keymap data table
       
    97 //
       
    98 const TUint16 StandardQwertyData_table_English_Taiwan[] =
       
    99     {
       
   100      0x0071,
       
   101      0x0077,
       
   102      0x0065,
       
   103      0x0072,
       
   104      0x0074,
       
   105      0x0079,
       
   106      0x0075,
       
   107      0x0069,
       
   108      0x006F,
       
   109      0x0070,
       
   110      0x003A,
       
   111      0x0061,
       
   112      0x0073,
       
   113      0x0064,
       
   114      0x0066,
       
   115      0x0067,
       
   116      0x0068,
       
   117      0x006A,
       
   118      0x006B,
       
   119      0x006C,
       
   120      0x0028,
       
   121      0x0029,
       
   122      0x007A,
       
   123      0x0078,
       
   124      0x0063,
       
   125      0x0076,
       
   126      0x0062,
       
   127      0x006E,
       
   128      0x006D,
       
   129      0x002C,
       
   130      0x002E,
       
   131      0x003F,
       
   132      0x0021,
       
   133      0x0051,
       
   134      0x0057,
       
   135      0x0045,
       
   136      0x0052,
       
   137      0x0054,
       
   138      0x0059,
       
   139      0x0055,
       
   140      0x0049,
       
   141      0x004F,
       
   142      0x0050,
       
   143      0x003A,
       
   144      0x0041,
       
   145      0x0053,
       
   146      0x0044,
       
   147      0x0046,
       
   148      0x0047,
       
   149      0x0048,
       
   150      0x004A,
       
   151      0x004B,
       
   152      0x004C,
       
   153      0x0028,
       
   154      0x0029,
       
   155      0x005A,
       
   156      0x0058,
       
   157      0x0043,
       
   158      0x0056,
       
   159      0x0042,
       
   160      0x004E,
       
   161      0x004D,
       
   162      0x002C,
       
   163      0x002E,
       
   164      0x003F,
       
   165      0x0021,
       
   166     };
       
   167 
       
   168 const TInt KStandardQwertyDataSize_English_Taiwan = 66;
       
   169 
       
   170 
       
   171 const TPtiKeyBinding StandardQwertyKeyBindings_table_English_Taiwan[] =
       
   172     {
       
   173         {EPtiKeyQwertyAtCharacter, EPtiCaseLower, 0, 1},
       
   174         {EPtiKeyQwerty1, EPtiCaseLower, 1, 1},
       
   175         {EPtiKeyQwerty2, EPtiCaseLower, 2, 1},
       
   176         {EPtiKeyQwerty3, EPtiCaseLower, 3, 1},
       
   177         {EPtiKeyQwerty4, EPtiCaseLower, 4, 1},
       
   178         {EPtiKeyQwerty5, EPtiCaseLower, 5, 1},
       
   179         {EPtiKeyQwerty6, EPtiCaseLower, 6, 1},
       
   180         {EPtiKeyQwerty7, EPtiCaseLower, 7, 1},
       
   181         {EPtiKeyQwerty8, EPtiCaseLower, 8, 1},
       
   182         {EPtiKeyQwerty9, EPtiCaseLower, 9, 1},
       
   183         {EPtiKeyQwerty0, EPtiCaseLower, 10, 1},
       
   184         {EPtiKeyQwertyPlus, EPtiCaseLower, 11, 1},
       
   185         {EPtiKeyQwertyQ, EPtiCaseLower, 12, 1},
       
   186         {EPtiKeyQwertyW, EPtiCaseLower, 13, 1},
       
   187         {EPtiKeyQwertyE, EPtiCaseLower, 14, 1},
       
   188         {EPtiKeyQwertyR, EPtiCaseLower, 15, 1},
       
   189         {EPtiKeyQwertyT, EPtiCaseLower, 16, 1},
       
   190         {EPtiKeyQwertyY, EPtiCaseLower, 17, 1},
       
   191         {EPtiKeyQwertyU, EPtiCaseLower, 18, 1},
       
   192         {EPtiKeyQwertyI, EPtiCaseLower, 19, 1},
       
   193         {EPtiKeyQwertyO, EPtiCaseLower, 20, 1},
       
   194         {EPtiKeyQwertyP, EPtiCaseLower, 21, 1},
       
   195         {EPtiKeyQwertyMinus, EPtiCaseLower, 22, 0},
       
   196         {EPtiKeyQwertyHash, EPtiCaseLower, 22, 1},
       
   197         {EPtiKeyQwertyA, EPtiCaseLower, 23, 1},
       
   198         {EPtiKeyQwertyS, EPtiCaseLower, 24, 1},
       
   199         {EPtiKeyQwertyD, EPtiCaseLower, 25, 1},
       
   200         {EPtiKeyQwertyF, EPtiCaseLower, 26, 1},
       
   201         {EPtiKeyQwertyG, EPtiCaseLower, 27, 1},
       
   202         {EPtiKeyQwertyH, EPtiCaseLower, 28, 1},
       
   203         {EPtiKeyQwertyJ, EPtiCaseLower, 29, 1},
       
   204         {EPtiKeyQwertyK, EPtiCaseLower, 30, 1},
       
   205         {EPtiKeyQwertyL, EPtiCaseLower, 31, 1},
       
   206         {EPtiKeyQwertySemicolon, EPtiCaseLower, 32, 1},
       
   207         {EPtiKeyQwertyApostrophe, EPtiCaseLower, 33, 0},
       
   208         {0x5b, EPtiCaseLower, 33, 0},
       
   209         {EPtiKeyQwertyZ, EPtiCaseLower, 33, 0},
       
   210         {EPtiKeyQwertyX, EPtiCaseLower, 33, 0},
       
   211         {EPtiKeyQwertyC, EPtiCaseLower, 33, 0},
       
   212         {EPtiKeyQwertyV, EPtiCaseLower, 33, 0},
       
   213         {EPtiKeyQwertyB, EPtiCaseLower, 33, 0},
       
   214         {EPtiKeyQwertyN, EPtiCaseLower, 33, 0},
       
   215         {EPtiKeyQwertyM, EPtiCaseLower, 33, 0},
       
   216         {EPtiKeyQwertyComma, EPtiCaseLower, 33, 0},
       
   217         {EPtiKeyQwertyFullstop, EPtiCaseLower, 33, 0},
       
   218         {EPtiKeyQwertySlash, EPtiCaseLower, 33, 0},
       
   219         {EPtiKeyQwertyAtCharacter, EPtiCaseUpper, 33, 1},
       
   220         {EPtiKeyQwerty1, EPtiCaseUpper, 34, 1},
       
   221         {EPtiKeyQwerty2, EPtiCaseUpper, 35, 1},
       
   222         {EPtiKeyQwerty3, EPtiCaseUpper, 36, 1},
       
   223         {EPtiKeyQwerty4, EPtiCaseUpper, 37, 1},
       
   224         {EPtiKeyQwerty5, EPtiCaseUpper, 38, 1},
       
   225         {EPtiKeyQwerty6, EPtiCaseUpper, 39, 1},
       
   226         {EPtiKeyQwerty7, EPtiCaseUpper, 40, 1},
       
   227         {EPtiKeyQwerty8, EPtiCaseUpper, 41, 1},
       
   228         {EPtiKeyQwerty9, EPtiCaseUpper, 42, 1},
       
   229         {EPtiKeyQwerty0, EPtiCaseUpper, 43, 1},
       
   230         {EPtiKeyQwertyPlus, EPtiCaseUpper, 44, 1},
       
   231         {EPtiKeyQwertyQ, EPtiCaseUpper, 45, 1},
       
   232         {EPtiKeyQwertyW, EPtiCaseUpper, 46, 1},
       
   233         {EPtiKeyQwertyE, EPtiCaseUpper, 47, 1},
       
   234         {EPtiKeyQwertyR, EPtiCaseUpper, 48, 1},
       
   235         {EPtiKeyQwertyT, EPtiCaseUpper, 49, 1},
       
   236         {EPtiKeyQwertyY, EPtiCaseUpper, 50, 1},
       
   237         {EPtiKeyQwertyU, EPtiCaseUpper, 51, 1},
       
   238         {EPtiKeyQwertyI, EPtiCaseUpper, 52, 1},
       
   239         {EPtiKeyQwertyO, EPtiCaseUpper, 53, 1},
       
   240         {EPtiKeyQwertyP, EPtiCaseUpper, 54, 1},
       
   241         {EPtiKeyQwertyMinus, EPtiCaseUpper, 55, 0},
       
   242         {EPtiKeyQwertyHash, EPtiCaseUpper, 55, 1},
       
   243         {EPtiKeyQwertyA, EPtiCaseUpper, 56, 1},
       
   244         {EPtiKeyQwertyS, EPtiCaseUpper, 57, 1},
       
   245         {EPtiKeyQwertyD, EPtiCaseUpper, 58, 1},
       
   246         {EPtiKeyQwertyF, EPtiCaseUpper, 59, 1},
       
   247         {EPtiKeyQwertyG, EPtiCaseUpper, 60, 1},
       
   248         {EPtiKeyQwertyH, EPtiCaseUpper, 61, 1},
       
   249         {EPtiKeyQwertyJ, EPtiCaseUpper, 62, 1},
       
   250         {EPtiKeyQwertyK, EPtiCaseUpper, 63, 1},
       
   251         {EPtiKeyQwertyL, EPtiCaseUpper, 64, 1},
       
   252         {EPtiKeyQwertySemicolon, EPtiCaseUpper, 65, 1},
       
   253         {EPtiKeyQwertyApostrophe, EPtiCaseUpper, 66, 0},
       
   254         {0x5b, EPtiCaseUpper, 66, 0},
       
   255         {EPtiKeyQwertyZ, EPtiCaseUpper, 66, 0},
       
   256         {EPtiKeyQwertyX, EPtiCaseUpper, 66, 0},
       
   257         {EPtiKeyQwertyC, EPtiCaseUpper, 66, 0},
       
   258         {EPtiKeyQwertyV, EPtiCaseUpper, 66, 0},
       
   259         {EPtiKeyQwertyB, EPtiCaseUpper, 66, 0},
       
   260         {EPtiKeyQwertyN, EPtiCaseUpper, 66, 0},
       
   261         {EPtiKeyQwertyM, EPtiCaseUpper, 66, 0},
       
   262         {EPtiKeyQwertyComma, EPtiCaseUpper, 66, 0},
       
   263         {EPtiKeyQwertyFullstop, EPtiCaseUpper, 66, 0},
       
   264         {EPtiKeyQwertySlash, EPtiCaseUpper, 66, 0},
       
   265     };
       
   266 
       
   267 const TInt KMaxStandardQwertyIndex_English_Taiwan = 92;
       
   268 
       
   269 //
       
   270 // Class implementation.
       
   271 //
       
   272 
       
   273 CPtiLangDataImplEnglish_Taiwan* CPtiLangDataImplEnglish_Taiwan::NewL()
       
   274     {
       
   275     return new (ELeave) CPtiLangDataImplEnglish_Taiwan();
       
   276     }
       
   277 
       
   278 
       
   279 TInt CPtiLangDataImplEnglish_Taiwan::LanguageCode() const
       
   280     {
       
   281     return ELangEnglish_Taiwan;
       
   282     }
       
   283 
       
   284 
       
   285 const TUint16* CPtiLangDataImplEnglish_Taiwan::KeyData(TPtiKeyboardType aKeyboardType, TInt& aDataSize) const
       
   286     {
       
   287     if (aKeyboardType == EPtiKeyboard12Key)
       
   288         {
       
   289         aDataSize = KMultitapDataSize_English_Taiwan;
       
   290         return MultitapData_table_English_Taiwan;
       
   291         }
       
   292     if (aKeyboardType == EPtiKeyboardQwerty4x12)
       
   293         {
       
   294         aDataSize = KStandardQwertyDataSize_English_Taiwan;
       
   295         return StandardQwertyData_table_English_Taiwan;
       
   296         }
       
   297 
       
   298     aDataSize = 0;
       
   299     return NULL;
       
   300     }
       
   301 
       
   302 
       
   303 const TPtiKeyBinding* CPtiLangDataImplEnglish_Taiwan::KeyBindingTable(TPtiKeyboardType aKeyboardType, TInt& aNumItems) const
       
   304     {
       
   305     if (aKeyboardType == EPtiKeyboard12Key)
       
   306         {
       
   307         aNumItems = KMaxMultitapIndex_English_Taiwan;
       
   308         return MultitapKeyBindings_table_English_Taiwan;
       
   309         }
       
   310     if (aKeyboardType == EPtiKeyboardQwerty4x12)
       
   311         {
       
   312         aNumItems = KMaxStandardQwertyIndex_English_Taiwan;
       
   313         return StandardQwertyKeyBindings_table_English_Taiwan;
       
   314         }
       
   315 
       
   316     aNumItems = 0;
       
   317     return NULL;
       
   318     }
       
   319 
       
   320