uifw/AknGlobalUI/AknCapServer/inc/AknKeyFilter.h
changeset 0 2f259fa3e83a
child 4 8ca85d2f0db7
child 31 335efd829e98
child 47 2f0c06423c72
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uifw/AknGlobalUI/AknCapServer/inc/AknKeyFilter.h	Tue Feb 02 01:00:49 2010 +0200
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Translates key events for different UI related situations.
+*
+*/
+
+#ifndef __AKN_KEY_FILTER__
+#define __AKN_KEY_FILTER__
+
+#include <coecntrl.h>
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+#include <centralrepository.h>
+#endif
+#include "AknCapServerEntry.h"
+
+const TInt KHomeHoldDelay = 600000;   // 0.6 sec
+
+class CAknServKeyFilter : public CCoeControl
+    {
+public:
+    CAknServKeyFilter();
+    void ConstructL(CAknCapAppServerAppUi& aAppUi);
+    ~CAknServKeyFilter();
+    
+private: // framework
+    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+    
+private: // new functions
+    TKeyResponse HandleHomeKeyEventL(TEventCode aType);
+    TKeyResponse HandleQwertyKeyEvent(const TKeyEvent& aKeyEvent, TEventCode aType);
+    void HandleFlipKeyEvent(TInt aCode);
+    static TInt HomeTickL(TAny* aThis);
+    void DoHomeTickL();
+    void ToggleShellL();
+    void ActivateViewL( const TVwsViewId& aViewId, TUid aCustomMessageId );
+    void CaptureHardwareStateKeysL();
+    void InitHardwareStateL();
+    TBool HandleHardwareStateKeyL(TInt aCode);
+    void FreeHardwareStateKeys();
+    void SetHardwareStateL(TInt aState);
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+    TInt CAknServKeyFilter::HwKeyToKeyBoardType(TInt aKeyCode);
+#endif
+
+private:
+    CAknCapAppServerAppUi* iAppUi; // not owned
+    CPeriodic* iHomeTimer;
+    TInt iSuppressAppSwitch;
+    TInt iHomeKeyHandle;
+    TVwsViewId iHomeViewId;
+    RArray<TInt32> iHardwareStateKeyCaptures;
+    TInt iQwertyOnKeyHandle;
+    TInt iQwertyOffKeyHandle;
+    TInt iFlipOpenKeyHandle;
+    TInt iFlipCloseKeyHandle;
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+    CRepository* iAvkonRepository;
+#endif
+    };
+
+#endif // __AKN_KEY_FILTER__