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