textinput/ptienginev2/src/PtiDefaultNumberModeMappingData.cpp
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Default number mode mapping data.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "PtiDefaultNumberModeMappingdata.h"
       
    20 
       
    21 const TUint16 MultitapData_table[] =
       
    22     {
       
    23     '1',
       
    24     '2',
       
    25     '3',
       
    26     '4',
       
    27     '5',
       
    28     '6',
       
    29     '7',
       
    30     '8',
       
    31     '9',
       
    32 	'*','+','p','w',    
       
    33     '0'    
       
    34     };
       
    35 
       
    36 const TInt KMultiTapDataSize = 14;
       
    37 
       
    38 const TPtiKeyBinding MultiTapKeyBindings_table[] =
       
    39     {
       
    40     {EPtiKey1, EPtiCaseLower, 0, 1},
       
    41     {EPtiKey2, EPtiCaseLower, 1, 1},
       
    42     {EPtiKey3, EPtiCaseLower, 2, 1},
       
    43     {EPtiKey4, EPtiCaseLower, 3, 1},
       
    44     {EPtiKey5, EPtiCaseLower, 4, 1},
       
    45     {EPtiKey6, EPtiCaseLower, 5, 1},
       
    46     {EPtiKey7, EPtiCaseLower, 6, 1},
       
    47     {EPtiKey8, EPtiCaseLower, 7, 1},
       
    48     {EPtiKey9, EPtiCaseLower, 8, 1},
       
    49     {EPtiKeyStar, EPtiCaseLower, 9, 4},
       
    50     {EPtiKey0, EPtiCaseLower, 13, 1},
       
    51     
       
    52     {EPtiKey1, EPtiCaseUpper, 0, 1},
       
    53     {EPtiKey2, EPtiCaseUpper, 1, 1},
       
    54     {EPtiKey3, EPtiCaseUpper, 2, 1},
       
    55     {EPtiKey4, EPtiCaseUpper, 3, 1},
       
    56     {EPtiKey5, EPtiCaseUpper, 4, 1},
       
    57     {EPtiKey6, EPtiCaseUpper, 5, 1},
       
    58     {EPtiKey7, EPtiCaseUpper, 6, 1},
       
    59     {EPtiKey8, EPtiCaseUpper, 7, 1},
       
    60     {EPtiKey9, EPtiCaseUpper, 8, 1},
       
    61     {EPtiKeyStar, EPtiCaseUpper, 9, 4},
       
    62     {EPtiKey0, EPtiCaseUpper, 13, 1}    
       
    63     };
       
    64 
       
    65 const TInt KMaxMultitapIndex = 22;
       
    66 
       
    67 //
       
    68 // CPtiNumberModeDataImpl
       
    69 //
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // CPtiNumberModeDataImpl::NewL
       
    73 // 
       
    74 // ---------------------------------------------------------------------------
       
    75 // 
       
    76 CPtiNumberModeDataImpl* CPtiNumberModeDataImpl::NewL()
       
    77 	{
       
    78     return new (ELeave) CPtiNumberModeDataImpl();	
       
    79 	}
       
    80 	
       
    81 	
       
    82 // ---------------------------------------------------------------------------
       
    83 // CPtiNumberModeDataImpl::LanguageCode
       
    84 // 
       
    85 // ---------------------------------------------------------------------------
       
    86 // 		
       
    87 TInt CPtiNumberModeDataImpl::LanguageCode() const
       
    88     {
       
    89     return ELangNumeric;
       
    90     }
       
    91 
       
    92 
       
    93 // ---------------------------------------------------------------------------
       
    94 // CPtiNumberModeDataImpl::KeyData
       
    95 // 
       
    96 // ---------------------------------------------------------------------------
       
    97 // 	
       
    98 const TUint16* CPtiNumberModeDataImpl::KeyData(TPtiKeyboardType /*aKeyboardType*/, TInt& aDataSize) const
       
    99     {    
       
   100     aDataSize = KMultiTapDataSize;
       
   101     return MultitapData_table;       
       
   102     }
       
   103 
       
   104 
       
   105 // ---------------------------------------------------------------------------
       
   106 // CPtiNumberModeDataImpl::KeyBindingTable
       
   107 // 
       
   108 // ---------------------------------------------------------------------------
       
   109 // 	
       
   110 const TPtiKeyBinding* CPtiNumberModeDataImpl::KeyBindingTable(TPtiKeyboardType /*aKeyboardType*/, TInt& aNumItems) const
       
   111     {
       
   112     aNumItems = KMaxMultitapIndex;
       
   113     return MultiTapKeyBindings_table;
       
   114     }	
       
   115 	
       
   116 // End of file.