21 #include <coecntrl.h> |
21 #include <coecntrl.h> |
22 #ifdef RD_INTELLIGENT_TEXT_INPUT |
22 #ifdef RD_INTELLIGENT_TEXT_INPUT |
23 #include <centralrepository.h> |
23 #include <centralrepository.h> |
24 #endif |
24 #endif |
25 #include "AknCapServerEntry.h" |
25 #include "AknCapServerEntry.h" |
|
26 #include "aknslidestatusnotifier.h" |
26 |
27 |
27 const TInt KHomeHoldDelay = 600000; // 0.6 sec |
28 const TInt KHomeHoldDelay = 600000; // 0.6 sec |
28 |
29 |
29 class CAknServKeyFilter : public CCoeControl |
30 class CAknServKeyFilter : public CCoeControl, |
|
31 public MAknSlideStatusObserver |
30 { |
32 { |
31 public: |
33 public: |
32 CAknServKeyFilter(); |
34 CAknServKeyFilter(); |
33 void ConstructL(CAknCapAppServerAppUi& aAppUi); |
35 void ConstructL(CAknCapAppServerAppUi& aAppUi); |
34 ~CAknServKeyFilter(); |
36 ~CAknServKeyFilter(); |
35 |
37 |
|
38 /** |
|
39 * From MAknSlideStatusObserver |
|
40 */ |
|
41 void SlideStatusChangedL( const TInt& aValue ); |
|
42 |
36 private: // framework |
43 private: // framework |
37 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
44 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
38 |
45 |
39 private: // new functions |
46 private: // new functions |
40 TKeyResponse HandleHomeKeyEventL(TEventCode aType); |
47 TKeyResponse HandleHomeKeyEventL(TEventCode aType); |
41 TKeyResponse HandleQwertyKeyEvent(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
42 void HandleFlipKeyEvent(TInt aCode); |
48 void HandleFlipKeyEvent(TInt aCode); |
43 static TInt HomeTickL(TAny* aThis); |
49 static TInt HomeTickL(TAny* aThis); |
44 void DoHomeTickL(); |
50 void DoHomeTickL(); |
45 void ToggleShellL(); |
51 void ToggleShellL(); |
46 void ActivateViewL( const TVwsViewId& aViewId, TUid aCustomMessageId ); |
52 void ActivateViewL( const TVwsViewId& aViewId, TUid aCustomMessageId ); |
50 void FreeHardwareStateKeys(); |
56 void FreeHardwareStateKeys(); |
51 void SetHardwareStateL(TInt aState); |
57 void SetHardwareStateL(TInt aState); |
52 #ifdef RD_INTELLIGENT_TEXT_INPUT |
58 #ifdef RD_INTELLIGENT_TEXT_INPUT |
53 TInt CAknServKeyFilter::HwKeyToKeyBoardType(TInt aKeyCode); |
59 TInt CAknServKeyFilter::HwKeyToKeyBoardType(TInt aKeyCode); |
54 #endif |
60 #endif |
55 |
61 void RotateScreenL( TInt aState ); |
|
62 void UpdateKeyboardLayout( TInt aKeyboardLayout ); |
|
63 |
56 private: |
64 private: |
57 CAknCapAppServerAppUi* iAppUi; // not owned |
65 CAknCapAppServerAppUi* iAppUi; // not owned |
58 CPeriodic* iHomeTimer; |
66 CPeriodic* iHomeTimer; |
59 TInt iSuppressAppSwitch; |
67 TInt iSuppressAppSwitch; |
60 TInt iHomeKeyHandle; |
68 TInt iHomeKeyHandle; |
61 TVwsViewId iHomeViewId; |
69 TVwsViewId iHomeViewId; |
62 RArray<TInt32> iHardwareStateKeyCaptures; |
70 RArray<TInt32> iHardwareStateKeyCaptures; |
63 TInt iQwertyOnKeyHandle; |
|
64 TInt iQwertyOffKeyHandle; |
|
65 TInt iFlipOpenKeyHandle; |
|
66 TInt iFlipCloseKeyHandle; |
|
67 #ifdef RD_INTELLIGENT_TEXT_INPUT |
71 #ifdef RD_INTELLIGENT_TEXT_INPUT |
68 CRepository* iAvkonRepository; |
72 CRepository* iAvkonRepository; |
69 #endif |
73 #endif |
|
74 |
|
75 TBool iSlideOpen; |
|
76 TInt iSensorOrientation; |
|
77 CAknSlideStatusNotifier* iSlideStatusObserver; |
70 }; |
78 }; |
71 |
79 |
72 #endif // __AKN_KEY_FILTER__ |
80 #endif // __AKN_KEY_FILTER__ |