bluetoothengine/bthid/keyboard/inc/keyboard.h
branchRCL_3
changeset 23 9386f31cc85b
parent 22 613943a21004
equal deleted inserted replaced
22:613943a21004 23:9386f31cc85b
    20 #define __KEYBOARD_H
    20 #define __KEYBOARD_H
    21 
    21 
    22 #include <e32std.h>
    22 #include <e32std.h>
    23 #include <w32std.h>
    23 #include <w32std.h>
    24 #include <e32event.h>
    24 #include <e32event.h>
       
    25 #include <aknkeylock.h>
    25 
    26 
    26 #include "hidinterfaces.h"
    27 #include "hidinterfaces.h"
    27 #include "hidkeys.h"
    28 #include "hidkeys.h"
    28 #include "layoutmgr.h"
    29 #include "layoutmgr.h"
    29 #include "timeoutnotifier.h"
    30 #include "timeoutnotifier.h"
   242      * @param aAppUid Application UID
   243      * @param aAppUid Application UID
   243      */
   244      */
   244     void LaunchApplicationL(TInt aAppUid);
   245     void LaunchApplicationL(TInt aAppUid);
   245 
   246 
   246     // Checks if multimedia-key (play,stop,..) and sends to RemCon
   247     // Checks if multimedia-key (play,stop,..) and sends to RemCon
   247     TBool HandleMultimediaKeys(TUint16 aScancodeKey, TBool aIsKeyDown,
   248     TBool HandleKeyMapping(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
   248             TUint8 aModifiers);
   249             TUint8 aModifiers);
   249     TBool HandleMultimediaKeysForNokia(TUint16 aScancodeKey,
   250     TBool HandleKeyMappingUp(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
   250             TBool aIsKeyDown, TUint8 aModifiers);
   251             TUint8 aModifiers);
   251     TBool HandleMultimediaKeysForStandard(TUint16 aScancodeKey,
   252     TBool HandleKeyMappingDown(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
   252             TBool aIsKeyDown, TUint8 aModifiers);
   253             TUint8 aModifiers);
       
   254     TBool HandleKeyMappingLeft(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
       
   255             TUint8 aModifiers);
       
   256     TBool HandleKeyMappingRight(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
       
   257             TUint8 aModifiers);
       
   258     TBool HandleKeyMappingOther(TDecodedKeyInfo& aKey, TBool aIsKeyDown,
       
   259             TUint8 aModifiers);
   253 
   260 
   254     TInt AppMenuId();
   261     TInt AppMenuId();
   255     TInt PhoneAppId();
   262     TInt PhoneAppId();
   256     TInt IdleAppId();
   263     TInt IdleAppId();
   257     TBool IsApplicationMenuTopMost();
   264     TBool IsApplicationMenuTopMost();
   258     TBool IsPhoneAppTopMost();
   265     TBool IsPhoneAppTopMost();
   259 
   266 
   260     // bitmap for Multimedia key states
   267     // bitmap for Multimedia key states
   261     enum TMmKeyDown
   268     enum TMmKeyDown
   262         {
   269         {
   263         EVolUp = 1,
   270         ENone       = 0x00,
   264         EVolDown = 2,
   271         EVolUp      = 0x01,
   265         EPlay = 4,
   272         EVolDown    = 0x02,
   266         EStop = 8,
   273         EPlay       = 0x04,
   267         ENext = 16,
   274         EStop       = 0x08,
   268         EPrev = 32
   275         ENext       = 0x10,
       
   276         EPrev       = 0x20,
       
   277         };
       
   278     
       
   279     // bitmap for navigation keys
       
   280     enum TNavKeyDown
       
   281         {
       
   282         ELsk        = 0x01,
       
   283         ERsk        = 0x02,
       
   284         ESend       = 0x04,
       
   285         EEnd        = 0x08,
       
   286         EEsc        = 0x10
   269         };
   287         };
   270 
   288 
   271     void ResetBitmap(TBool aIsKeyDown, TMmKeyDown aBitmapToReset);
   289     void ResetBitmap(TBool aIsKeyDown, TMmKeyDown aBitmapToReset);
   272 
   290 
   273     /**
   291     /**
   338 
   356 
   339     CHidInputDataHandlingReg* iInputHandlingReg;
   357     CHidInputDataHandlingReg* iInputHandlingReg;
   340 
   358 
   341     // This timer stops key repeating after defined time to prevent endless key repeats in error cases. Fix for EMKD-7FBB9H
   359     // This timer stops key repeating after defined time to prevent endless key repeats in error cases. Fix for EMKD-7FBB9H
   342     CTimeOutTimer* iRepeatEndTimer;
   360     CTimeOutTimer* iRepeatEndTimer;
       
   361     
       
   362     TUint8 iNavKeyDown;
       
   363     RAknKeyLock iKeyLock;
   343     };
   364     };
   344 
   365 
   345 // ----------------------------------------------------------------------
   366 // ----------------------------------------------------------------------
   346 // Helpers for sending key events:
   367 // Helpers for sending key events:
   347 
   368