uifw/AknGlobalUI/AknCapServer/inc/AknKeyFilter.h
changeset 0 2f259fa3e83a
child 4 8ca85d2f0db7
child 31 335efd829e98
child 47 2f0c06423c72
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2005-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 "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:  Translates key events for different UI related situations.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __AKN_KEY_FILTER__
       
    19 #define __AKN_KEY_FILTER__
       
    20 
       
    21 #include <coecntrl.h>
       
    22 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
    23 #include <centralrepository.h>
       
    24 #endif
       
    25 #include "AknCapServerEntry.h"
       
    26 
       
    27 const TInt KHomeHoldDelay = 600000;   // 0.6 sec
       
    28 
       
    29 class CAknServKeyFilter : public CCoeControl
       
    30     {
       
    31 public:
       
    32     CAknServKeyFilter();
       
    33     void ConstructL(CAknCapAppServerAppUi& aAppUi);
       
    34     ~CAknServKeyFilter();
       
    35     
       
    36 private: // framework
       
    37     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
    38     
       
    39 private: // new functions
       
    40     TKeyResponse HandleHomeKeyEventL(TEventCode aType);
       
    41     TKeyResponse HandleQwertyKeyEvent(const TKeyEvent& aKeyEvent, TEventCode aType);
       
    42     void HandleFlipKeyEvent(TInt aCode);
       
    43     static TInt HomeTickL(TAny* aThis);
       
    44     void DoHomeTickL();
       
    45     void ToggleShellL();
       
    46     void ActivateViewL( const TVwsViewId& aViewId, TUid aCustomMessageId );
       
    47     void CaptureHardwareStateKeysL();
       
    48     void InitHardwareStateL();
       
    49     TBool HandleHardwareStateKeyL(TInt aCode);
       
    50     void FreeHardwareStateKeys();
       
    51     void SetHardwareStateL(TInt aState);
       
    52 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
    53     TInt CAknServKeyFilter::HwKeyToKeyBoardType(TInt aKeyCode);
       
    54 #endif
       
    55 
       
    56 private:
       
    57     CAknCapAppServerAppUi* iAppUi; // not owned
       
    58     CPeriodic* iHomeTimer;
       
    59     TInt iSuppressAppSwitch;
       
    60     TInt iHomeKeyHandle;
       
    61     TVwsViewId iHomeViewId;
       
    62     RArray<TInt32> iHardwareStateKeyCaptures;
       
    63     TInt iQwertyOnKeyHandle;
       
    64     TInt iQwertyOffKeyHandle;
       
    65     TInt iFlipOpenKeyHandle;
       
    66     TInt iFlipCloseKeyHandle;
       
    67 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
    68     CRepository* iAvkonRepository;
       
    69 #endif
       
    70     };
       
    71 
       
    72 #endif // __AKN_KEY_FILTER__