textinput/ptienginev2/languages/PtiKeymappings_ITUT_42.cpp
changeset 0 eb1f2e154e89
child 11 c8fb4cf7b3ae
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     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_42.h"
       
    34 
       
    35 //
       
    36 // Multitap keymap data table
       
    37 //
       
    38 const TUint16 MultitapData_table_Bulgarian[] =
       
    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      0x430,0x431,0x432,0x433,0x32,0x61,0x62,0x63,
       
    42      0x434,0x435,0x436,0x437,0x33,0x64,0x65,0x66,
       
    43      0x438,0x439,0x43a,0x43b,0x34,0x67,0x68,0x69,
       
    44      0x43c,0x43d,0x43e,0x43f,0x35,0x6a,0x6b,0x6c,
       
    45      0x440,0x441,0x442,0x443,0x36,0x6d,0x6e,0x6f,
       
    46      0x444,0x445,0x446,0x447,0x37,0x70,0x71,0x72,0x73,
       
    47      0x448,0x449,0x44a,0x38,0x74,0x75,0x76,
       
    48      0x44c,0x44e,0x44f,0x39,0x44b,0x44d,0x77,0x78,0x79,0x7a,
       
    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      0x410,0x411,0x412,0x413,0x32,0x41,0x42,0x43,
       
    52      0x414,0x415,0x416,0x417,0x33,0x44,0x45,0x46,
       
    53      0x418,0x419,0x41a,0x41b,0x34,0x47,0x48,0x49,
       
    54      0x41c,0x41d,0x41e,0x41f,0x35,0x4a,0x4b,0x4c,
       
    55      0x420,0x421,0x422,0x423,0x36,0x4d,0x4e,0x4f,
       
    56      0x424,0x425,0x426,0x427,0x37,0x50,0x51,0x52,0x53,
       
    57      0x428,0x429,0x42a,0x38,0x54,0x55,0x56,
       
    58      0x42c,0x42e,0x42f,0x39,0x42b,0x42d,0x57,0x58,0x59,0x5a,
       
    59      0x20,0x30,0x21b2,
       
    60     };
       
    61 
       
    62 const TInt KMultitapDataSize_Bulgarian = 198;
       
    63 
       
    64 
       
    65 const TPtiKeyBinding MultitapKeyBindings_table_Bulgarian[] =
       
    66     {
       
    67         {EPtiKey1, EPtiCaseLower, 0, 30},
       
    68         {EPtiKey2, EPtiCaseLower, 30, 8},
       
    69         {EPtiKey3, EPtiCaseLower, 38, 8},
       
    70         {EPtiKey4, EPtiCaseLower, 46, 8},
       
    71         {EPtiKey5, EPtiCaseLower, 54, 8},
       
    72         {EPtiKey6, EPtiCaseLower, 62, 8},
       
    73         {EPtiKey7, EPtiCaseLower, 70, 9},
       
    74         {EPtiKey8, EPtiCaseLower, 79, 7},
       
    75         {EPtiKey9, EPtiCaseLower, 86, 10},
       
    76         {EPtiKeyStar, EPtiCaseLower, 96, 0},
       
    77         {EPtiKey0, EPtiCaseLower, 96, 3},
       
    78         {EPtiKeyHash, EPtiCaseLower, 99, 0},
       
    79         {EPtiKey1, EPtiCaseUpper, 99, 30},
       
    80         {EPtiKey2, EPtiCaseUpper, 129, 8},
       
    81         {EPtiKey3, EPtiCaseUpper, 137, 8},
       
    82         {EPtiKey4, EPtiCaseUpper, 145, 8},
       
    83         {EPtiKey5, EPtiCaseUpper, 153, 8},
       
    84         {EPtiKey6, EPtiCaseUpper, 161, 8},
       
    85         {EPtiKey7, EPtiCaseUpper, 169, 9},
       
    86         {EPtiKey8, EPtiCaseUpper, 178, 7},
       
    87         {EPtiKey9, EPtiCaseUpper, 185, 10},
       
    88         {EPtiKeyStar, EPtiCaseUpper, 195, 0},
       
    89         {EPtiKey0, EPtiCaseUpper, 195, 3},
       
    90         {EPtiKeyHash, EPtiCaseUpper, 198, 0},
       
    91     };
       
    92 
       
    93 const TInt KMaxMultitapIndex_Bulgarian = 24;
       
    94 
       
    95 //
       
    96 // StandardQwerty keymap data table
       
    97 //
       
    98 const TUint16 StandardQwertyData_table_Bulgarian[] =
       
    99     {
       
   100      0x31,
       
   101      0x32,
       
   102      0x33,
       
   103      0x34,
       
   104      0x35,
       
   105      0x36,
       
   106      0x37,
       
   107      0x38,
       
   108      0x39,
       
   109      0x30,
       
   110      0x2c,
       
   111      0x443,
       
   112      0x435,
       
   113      0x438,
       
   114      0x448,
       
   115      0x449,
       
   116      0x43a,
       
   117      0x441,
       
   118      0x434,
       
   119      0x437,
       
   120      0x446,
       
   121      0x2e,
       
   122      0x44c,
       
   123      0x44f,
       
   124      0x430,
       
   125      0x43e,
       
   126      0x436,
       
   127      0x433,
       
   128      0x442,
       
   129      0x43d,
       
   130      0x432,
       
   131      0x43c,
       
   132      0x447,
       
   133      0x28,
       
   134      0x44e,
       
   135      0x439,
       
   136      0x44a,
       
   137      0x44d,
       
   138      0x444,
       
   139      0x445,
       
   140      0x43f,
       
   141      0x440,
       
   142      0x43b,
       
   143      0x431,
       
   144      0x21,
       
   145      0x3f,
       
   146      0x2b,
       
   147      0x22,
       
   148      0x25,
       
   149      0x3d,
       
   150      0x3a,
       
   151      0x2f,
       
   152      0x5f,
       
   153      0x3b,
       
   154      0x44b,
       
   155      0x423,
       
   156      0x415,
       
   157      0x418,
       
   158      0x428,
       
   159      0x429,
       
   160      0x41a,
       
   161      0x421,
       
   162      0x414,
       
   163      0x417,
       
   164      0x426,
       
   165      0x2d,
       
   166      0x42c,
       
   167      0x42f,
       
   168      0x410,
       
   169      0x41e,
       
   170      0x416,
       
   171      0x413,
       
   172      0x422,
       
   173      0x41d,
       
   174      0x412,
       
   175      0x41c,
       
   176      0x427,
       
   177      0x29,
       
   178      0x42e,
       
   179      0x419,
       
   180      0x42a,
       
   181      0x42d,
       
   182      0x424,
       
   183      0x425,
       
   184      0x41f,
       
   185      0x420,
       
   186      0x41b,
       
   187      0x411,
       
   188     };
       
   189 
       
   190 const TInt KStandardQwertyDataSize_Bulgarian = 88;
       
   191 
       
   192 
       
   193 const TPtiKeyBinding StandardQwertyKeyBindings_table_Bulgarian[] =
       
   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_Bulgarian = 88;
       
   286 
       
   287 
       
   288 //
       
   289 // Numeric key data table for StandardQwerty
       
   290 //
       
   291 const TPtiNumericKeyBinding StandardQwertyNumericKeysData_table_Bulgarian[] =
       
   292 	{
       
   293 	{'*',EPtiKeyQwerty8,EPtiCaseUpper},
       
   294 	{'#',EPtiKeyQwertyHash,EPtiCaseLower},
       
   295 	{'p',EPtiKeyQwertyP,EPtiCaseLower},
       
   296 	{'w',EPtiKeyQwertyW,EPtiCaseLower},
       
   297 	{'E',EPtiKeyQwertyE,EPtiCaseUpper},
       
   298 	};
       
   299 
       
   300 const TInt KNumStandardQwertyNumericKeysEntries_Bulgarian = 5;
       
   301 //
       
   302 // Class implementation.
       
   303 //
       
   304 
       
   305 CPtiLangDataImplBulgarian* CPtiLangDataImplBulgarian::NewL()
       
   306     {
       
   307     return new (ELeave) CPtiLangDataImplBulgarian();
       
   308     }
       
   309 
       
   310 
       
   311 TInt CPtiLangDataImplBulgarian::LanguageCode() const
       
   312     {
       
   313     return ELangBulgarian;
       
   314     }
       
   315 
       
   316 
       
   317 const TUint16* CPtiLangDataImplBulgarian::KeyData(TPtiKeyboardType aKeyboardType, TInt& aDataSize) const
       
   318     {
       
   319     if (aKeyboardType == EPtiKeyboard12Key)
       
   320         {
       
   321         aDataSize = KMultitapDataSize_Bulgarian;
       
   322         return MultitapData_table_Bulgarian;
       
   323         }
       
   324     if (aKeyboardType == EPtiKeyboardQwerty4x12)
       
   325         {
       
   326         aDataSize = KStandardQwertyDataSize_Bulgarian;
       
   327         return StandardQwertyData_table_Bulgarian;
       
   328         }
       
   329 
       
   330     aDataSize = 0;
       
   331     return NULL;
       
   332     }
       
   333 
       
   334 
       
   335 const TPtiKeyBinding* CPtiLangDataImplBulgarian::KeyBindingTable(TPtiKeyboardType aKeyboardType, TInt& aNumItems) const
       
   336     {
       
   337     if (aKeyboardType == EPtiKeyboard12Key)
       
   338         {
       
   339         aNumItems = KMaxMultitapIndex_Bulgarian;
       
   340         return MultitapKeyBindings_table_Bulgarian;
       
   341         }
       
   342     if (aKeyboardType == EPtiKeyboardQwerty4x12)
       
   343         {
       
   344         aNumItems = KMaxStandardQwertyIndex_Bulgarian;
       
   345         return StandardQwertyKeyBindings_table_Bulgarian;
       
   346         }
       
   347 
       
   348     aNumItems = 0;
       
   349     return NULL;
       
   350     }
       
   351 
       
   352 
       
   353 const TPtiNumericKeyBinding* CPtiLangDataImplBulgarian::NumericModeKeysTable(TPtiKeyboardType aKeyboardType, TInt& aNumEntries) const
       
   354     {
       
   355     if (aKeyboardType == EPtiKeyboardQwerty4x12)
       
   356         {
       
   357         aNumEntries = KNumStandardQwertyNumericKeysEntries_Bulgarian;
       
   358         return StandardQwertyNumericKeysData_table_Bulgarian;
       
   359         }
       
   360 
       
   361     aNumEntries = 0;
       
   362     return NULL;
       
   363     }
       
   364 
       
   365 
       
   366 
       
   367 TBool CPtiLangDataImplBulgarian::SuitableForLatinOnlyMode() const
       
   368     {
       
   369     return EFalse;
       
   370     }
       
   371 
       
   372