uifw/AvKon/src/aknkeys.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // This include should be the first #include in this file.
       
    20 #include "aknkeys.h"
       
    21 #include <coedef.h>
       
    22 
       
    23 TBool AknKeys::IsNumberKey(const TKeyEvent& aKeyEvent, TEventCode aType)
       
    24     {
       
    25     if (aType!=EEventKey)
       
    26         {
       
    27         return EFalse;
       
    28         }
       
    29     
       
    30     switch (aKeyEvent.iCode) 
       
    31         {
       
    32         case '1':
       
    33         case '2':
       
    34         case '3':
       
    35         case '4':
       
    36         case '5':
       
    37         case '6':
       
    38         case '7':
       
    39         case '8':
       
    40         case '9':
       
    41         case '0':
       
    42             {
       
    43             return ETrue;
       
    44             }
       
    45         default:
       
    46             {
       
    47             return EFalse;
       
    48             }
       
    49         }
       
    50     }
       
    51 
       
    52 // End of File