javauis/lcdui_akn/lcdui/src/CMIDKeyDecoder.cpp
branchRCL_3
changeset 29 0561add730c4
parent 19 04becd199f91
equal deleted inserted replaced
28:93cfe064caa0 29:0561add730c4
   220     CRepository* repository = NULL;
   220     CRepository* repository = NULL;
   221     TInt err = KErrNone;
   221     TInt err = KErrNone;
   222     TRAP(err, repository = CRepository::NewL(KCRUidMidpLcdui));
   222     TRAP(err, repository = CRepository::NewL(KCRUidMidpLcdui));
   223     // 2 bytes in scan code
   223     // 2 bytes in scan code
   224     TBuf8<2> scanCodeBuffer;
   224     TBuf8<2> scanCodeBuffer;
   225     CleanupStack::PushL(repository);
   225     if (err == KErrNone)
   226     err = repository->Get(KAdditionalSelectKeyMapping,scanCodeBuffer);
   226     {
   227     CleanupStack::PopAndDestroy(repository);
   227         CleanupStack::PushL(repository);
       
   228         err = repository->Get(KAdditionalSelectKeyMapping,scanCodeBuffer);
       
   229         CleanupStack::PopAndDestroy(repository);
       
   230     }
   228     if (err == KErrNone)
   231     if (err == KErrNone)
   229     {
   232     {
   230         TUint8 scanCodeLeft = scanCodeBuffer[0];
   233         TUint8 scanCodeLeft = scanCodeBuffer[0];
   231         TUint8 scanCodeRight = scanCodeBuffer[1];
   234         TUint8 scanCodeRight = scanCodeBuffer[1];
   232         TUint scanCode = (scanCodeLeft << 8) + scanCodeRight;
   235         TUint scanCode = (scanCodeLeft << 8) + scanCodeRight;