bluetoothengine/bthid/keyboard/inc/keyboard.h
branchRCL_3
changeset 39 5a89845f78e2
parent 16 b23265fb36da
child 53 eede1356aa52
--- a/bluetoothengine/bthid/keyboard/inc/keyboard.h	Wed Jun 09 09:52:54 2010 +0300
+++ b/bluetoothengine/bthid/keyboard/inc/keyboard.h	Mon Jun 21 15:51:46 2010 +0300
@@ -22,14 +22,12 @@
 #include <e32std.h>
 #include <w32std.h>
 #include <e32event.h>
+//#include <aknkeylock.h>
 
 #include "hidinterfaces.h"
 #include "hidkeys.h"
 #include "layoutmgr.h"
 #include "timeoutnotifier.h"
-#include <e32msgqueue.h>
-#include <e32cmn.h>
-#include "pointmsgqueue.h"
 #include "bthidsettings.h"
 
 class CField;
@@ -67,16 +65,6 @@
         KNumInputFieldTypes
         };
 
-    // The types of keyboard input report fields that we handle:
-    enum TMouseFieldType
-        {
-        EMouseButtons = 0,
-        EMouseXY = 1,
-        EMouseWheel = 2,
-        EMouseMediaKeys = 3,
-        EMousePowerKeys = 4,
-        KMouseInputFieldTypes
-        };
 public:
     // Constructors and destructor
     /*!
@@ -210,14 +198,6 @@
 
     // Handles the states of the modifier keys
     void UpdateModifiers(TInt aFieldIndex, const TDesC8& aReport);
-    // Handles the states of the XY (mouse up, down, left, right)
-    void UpdateXY(TInt aFieldIndex, const TDesC8& aReport);
-
-    // Handles the states of the Buttons (left & right button)
-    void UpdateButtons(TInt aFieldIndex, const TDesC8& aReport);
-
-    // Handles the states of the wheel
-    void UpdateWheel(TInt aFieldIndex, const TDesC8& aReport);
 
     // Handle key presses
     void ProcessKeys(TInt aFieldIndex, const TDesC8& aReport);
@@ -265,12 +245,18 @@
     void LaunchApplicationL(TInt aAppUid);
 
     // Checks if multimedia-key (play,stop,..) and sends to RemCon
-    TBool HandleMultimediaKeys(TUint16 aScancodeKey, TBool aIsKeyDown,
+    TBool HandleKeyMapping(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
+            TUint8 aModifiers);
+    TBool HandleKeyMappingUp(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
+            TUint8 aModifiers);
+    TBool HandleKeyMappingDown(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
             TUint8 aModifiers);
-    TBool HandleMultimediaKeysForNokia(TUint16 aScancodeKey,
-            TBool aIsKeyDown, TUint8 aModifiers);
-    TBool HandleMultimediaKeysForStandard(TUint16 aScancodeKey,
-            TBool aIsKeyDown, TUint8 aModifiers);
+    TBool HandleKeyMappingLeft(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
+            TUint8 aModifiers);
+    TBool HandleKeyMappingRight(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
+            TUint8 aModifiers);
+    TBool HandleKeyMappingOther(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
+            TUint8 aModifiers);
 
     TInt AppMenuId();
     TInt PhoneAppId();
@@ -281,12 +267,23 @@
     // bitmap for Multimedia key states
     enum TMmKeyDown
         {
-        EVolUp = 1,
-        EVolDown = 2,
-        EPlay = 4,
-        EStop = 8,
-        ENext = 16,
-        EPrev = 32
+        ENone       = 0x00,
+        EVolUp      = 0x01,
+        EVolDown    = 0x02,
+        EPlay       = 0x04,
+        EStop       = 0x08,
+        ENext       = 0x10,
+        EPrev       = 0x20,
+        };
+    
+    // bitmap for navigation keys
+    enum TNavKeyDown
+        {
+        ELsk        = 0x01,
+        ERsk        = 0x02,
+        ESend       = 0x04,
+        EEnd        = 0x08,
+        EEsc        = 0x10
         };
 
     void ResetBitmap(TBool aIsKeyDown, TMmKeyDown aBitmapToReset);
@@ -302,17 +299,10 @@
     // ----------------------------------------
 
     static TInt ResetArrayToSize(RArray<TInt>& aArray, TInt aSize);
-    void MoveCursor(const TPoint& aPoint);
-    TInt PostPointer(const TPoint& aPoint);
-    TInt SendButtonEvent(TBool aButtonDown);
 
     TBool IsDigitKey(TInt aScanCode);
     TBool IsSpecialHandleKey(TInt aUniCode);
 
-    void LaunchApplicationL(const TDesC& aName);
-    
-    //Redraw cursor
-    void CursorRedraw();
 private:
 
     TKeyboardDriverState iDriverState;
@@ -333,9 +323,6 @@
     // various types of key:
     const CField* iField[KNumInputFieldTypes];
 
-    // Pointers to the fields in the report descriptor containing the
-    // various types of key:
-    const CField* iMouseField[KMouseInputFieldTypes];
     // Pointer to the field in the report descriptor containing the LEDs:
     const CField* iLedField;
 
@@ -371,13 +358,9 @@
 
     // This timer stops key repeating after defined time to prevent endless key repeats in error cases. Fix for EMKD-7FBB9H
     CTimeOutTimer* iRepeatEndTimer;
-
-    TBool iComboDevice;
-
-    RMsgQueue<TPointBuffer> iPointBufQueue;
-    TPointBuffer iPointerBuffer;
-    TBool iButtonDown;
-    TBool iButton2Down;
+    
+    TUint8 iNavKeyDown;
+//    RAknKeyLock iKeyLock;
     };
 
 // ----------------------------------------------------------------------