qtmobileextensions/src/keycapture/xqkeycapture.cpp
changeset 27 6bfad47013df
parent 19 46686fb6258c
equal deleted inserted replaced
26:3d09643def13 27:6bfad47013df
   294         Qt::KeyboardModifiers aModifier)
   294         Qt::KeyboardModifiers aModifier)
   295 {
   295 {
   296     Qt::Key key;
   296     Qt::Key key;
   297     bool result = true;
   297     bool result = true;
   298     foreach (key, list) {
   298     foreach (key, list) {
   299         bool result = result & captureKey(key, aModifiersMask, aModifier);
   299         result = result & captureKey(key, aModifiersMask, aModifier);
   300     }
   300     }
   301     return result;
   301     return result;
   302 }
   302 }
   303 
   303 
   304 /*!
   304 /*!
   313         Qt::KeyboardModifiers aModifier)
   313         Qt::KeyboardModifiers aModifier)
   314 {
   314 {
   315     TUint key;
   315     TUint key;
   316     bool result = true;
   316     bool result = true;
   317     foreach (key, list) {
   317     foreach (key, list) {
   318         bool result = result & captureKey(key, aModifiersMask, aModifier);
   318         result = result & captureKey(key, aModifiersMask, aModifier);
   319     }
   319     }
   320     return result;
   320     return result;
   321 }
   321 }
   322 
   322 
   323 /*!
   323 /*!
   333         XQKeyCapture::LongFlags aLongType)
   333         XQKeyCapture::LongFlags aLongType)
   334 {
   334 {
   335     Qt::Key key;
   335     Qt::Key key;
   336     bool result = true;
   336     bool result = true;
   337     foreach (key, list) {
   337     foreach (key, list) {
   338         bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
   338         result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
   339     }
   339     }
   340     return result;
   340     return result;
   341 }
   341 }
   342 
   342 
   343 /*!
   343 /*!
   353         XQKeyCapture::LongFlags aLongType)
   353         XQKeyCapture::LongFlags aLongType)
   354 {
   354 {
   355     TUint key;
   355     TUint key;
   356     bool result = true;
   356     bool result = true;
   357     foreach (key, list) {
   357     foreach (key, list) {
   358         bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
   358         result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
   359     }
   359     }
   360     return result;
   360     return result;
   361 }
   361 }
   362 
   362 
   363 /*!
   363 /*!
   372         Qt::KeyboardModifiers aModifier)
   372         Qt::KeyboardModifiers aModifier)
   373 {
   373 {
   374     Qt::Key key;
   374     Qt::Key key;
   375     bool result = true;
   375     bool result = true;
   376     foreach (key, list) {
   376     foreach (key, list) {
   377         bool result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
   377         result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
   378     }
   378     }
   379     return result;
   379     return result;
   380 }
   380 }
   381 
   381 
   382 /*!
   382 /*!
   391         Qt::KeyboardModifiers aModifier)
   391         Qt::KeyboardModifiers aModifier)
   392 {
   392 {
   393     TUint key;
   393     TUint key;
   394     bool result = true;
   394     bool result = true;
   395     foreach (key, list) {
   395     foreach (key, list) {
   396         bool result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
   396         result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
   397     }
   397     }
   398     return result;
   398     return result;
   399 }
   399 }
   400 
   400 
   401 /*!
   401 /*!
   410         Qt::KeyboardModifiers aModifier)
   410         Qt::KeyboardModifiers aModifier)
   411 {
   411 {
   412     Qt::Key key;
   412     Qt::Key key;
   413     bool result = true;
   413     bool result = true;
   414     foreach (key, list) {
   414     foreach (key, list) {
   415         bool result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
   415         result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
   416     }
   416     }
   417     return result;
   417     return result;
   418 }
   418 }
   419 
   419 
   420 /*!
   420 /*!
   429         Qt::KeyboardModifiers aModifier)
   429         Qt::KeyboardModifiers aModifier)
   430 {
   430 {
   431     TUint key;
   431     TUint key;
   432     bool result = true;
   432     bool result = true;
   433     foreach (key, list) {
   433     foreach (key, list) {
   434         bool result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
   434         result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
   435     }
   435     }
   436     return result;
   436     return result;
   437 }
   437 }
   438 
   438 
   439 /*!
   439 /*!
   449         XQKeyCapture::LongFlags aLongType)
   449         XQKeyCapture::LongFlags aLongType)
   450 {
   450 {
   451     Qt::Key key;
   451     Qt::Key key;
   452     bool result = true;
   452     bool result = true;
   453     foreach (key, list) {
   453     foreach (key, list) {
   454         bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
   454         result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
   455     }
   455     }
   456     return result;
   456     return result;
   457 }
   457 }
   458 
   458 
   459 /*!
   459 /*!
   469         XQKeyCapture::LongFlags aLongType)
   469         XQKeyCapture::LongFlags aLongType)
   470 {
   470 {
   471     TUint key;
   471     TUint key;
   472     bool result = true;
   472     bool result = true;
   473     foreach (key, list) {
   473     foreach (key, list) {
   474         bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
   474         result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
   475     }
   475     }
   476     return result;
   476     return result;
   477 }
   477 }
   478 
   478 
   479 /*!
   479 /*!
   488         Qt::KeyboardModifiers aModifier)
   488         Qt::KeyboardModifiers aModifier)
   489 {
   489 {
   490     Qt::Key key;
   490     Qt::Key key;
   491     bool result = true;
   491     bool result = true;
   492     foreach (key, list) {
   492     foreach (key, list) {
   493         bool result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
   493         result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
   494     }
   494     }
   495     return result;
   495     return result;
   496 }
   496 }
   497 
   497 
   498 /*!
   498 /*!
   507         Qt::KeyboardModifiers aModifier)
   507         Qt::KeyboardModifiers aModifier)
   508 {
   508 {
   509     TUint key;
   509     TUint key;
   510     bool result = true;
   510     bool result = true;
   511     foreach (key, list) {
   511     foreach (key, list) {
   512         bool result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
   512         result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
   513     }
   513     }
   514     return result;
   514     return result;
   515 }
   515 }
   516 
   516 
   517 /*!
   517 // end of file
   518  Constructor.
       
   519 */
       
   520 XqKeyCapture::XqKeyCapture() :
       
   521     d(new KeyCapturePrivate())
       
   522 {
       
   523 
       
   524 }
       
   525 
       
   526 /*!
       
   527  Destructor.
       
   528 */
       
   529 XqKeyCapture::~XqKeyCapture()
       
   530 {
       
   531     delete d;
       
   532 }
       
   533 
       
   534 /*!
       
   535  Selects a given key for capturing key pressing. Requires a Qt key code.
       
   536  \param aKey A Qt key.
       
   537  \param aModifiersMask
       
   538  \param aModifier 
       
   539  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   540  */
       
   541 /*!
       
   542  Selects a given key for capturing key pressing. Requires a Qt key code.
       
   543  \param aKey A Qt key.
       
   544  \param aModifiersMask
       
   545  \param aModifier 
       
   546  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   547  */
       
   548 bool XqKeyCapture::captureKey(Qt::Key aKey,
       
   549     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   550 {
       
   551     return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier,
       
   552         CaptureRequest::CaptureRequestTypeNormal);
       
   553 }
       
   554 
       
   555 /*!
       
   556  Selects a given key for capturing key pressing. Requires a S60 key code (TKeyCode).
       
   557  \param aKey A S60 key code (TKeyCode).
       
   558  \param aModifiersMask
       
   559  \param aModifier 
       
   560  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   561  */
       
   562 bool XqKeyCapture::captureKey(TUint aKey,
       
   563     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   564 {
       
   565     return d->doCapture(aKey, aModifiersMask, aModifier,
       
   566         CaptureRequest::CaptureRequestTypeNormal);
       
   567 }
       
   568 
       
   569 /*!
       
   570  Selects a given key for capturing long pressing. Requires a Qt key code.
       
   571  \param aKey A Qt key.
       
   572  \param aModifiersMask
       
   573  \param aModifier 
       
   574  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   575  */
       
   576 bool XqKeyCapture::captureLongKey(Qt::Key aKey,
       
   577     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
       
   578     XqKeyCapture::LongFlags aLongType)
       
   579 {
       
   580     return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier,
       
   581         CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType);
       
   582 }
       
   583 
       
   584 /*!
       
   585  Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode).
       
   586  \param aKey A S60 key code (TKeyCode).
       
   587  \param aModifiersMap
       
   588  \param aModifier 
       
   589  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   590  */
       
   591 bool XqKeyCapture::captureLongKey(TUint aKey,
       
   592     Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier,
       
   593     XqKeyCapture::LongFlags aLongType)
       
   594 {
       
   595     return d->doCapture(aKey, aModifiersMap, aModifier,
       
   596         CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType);
       
   597 }
       
   598 
       
   599 /*!
       
   600  Selects a given key for capturing pressing up and down. Requires a Qt key code.
       
   601  \param aKey A Qt key.
       
   602  \param aModifiersMask
       
   603  \param aModifier 
       
   604  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   605  */
       
   606 bool XqKeyCapture::captureKeyUpAndDowns(Qt::Key aKey,
       
   607     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   608 {
       
   609     return d->doCapture(d->mMapper->mapQtToS60ScanCodes(aKey), aModifiersMask,
       
   610         aModifier, CaptureRequest::CaptureRequestTypeUpAndDown);
       
   611 }
       
   612 
       
   613 /*!
       
   614  Selects a given key for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
       
   615  \param aKey A S60 key scan code (TStdScanCode).
       
   616  \param aModifiersMask
       
   617  \param aModifier 
       
   618  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   619  */
       
   620 bool XqKeyCapture::captureKeyUpAndDowns(TUint aKey,
       
   621     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   622 {
       
   623     return d->doCapture(aKey, aModifiersMask,
       
   624         aModifier, CaptureRequest::CaptureRequestTypeUpAndDown);
       
   625 }
       
   626 
       
   627 /*!
       
   628  Deselects a given key from key capturing. Requires a Qt key code.
       
   629  \param aKey A Qt key.
       
   630  \param aModifiersMask
       
   631  \param aModifier 
       
   632  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   633  */
       
   634 bool XqKeyCapture::cancelCaptureKey(Qt::Key aKey,
       
   635     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   636 {
       
   637     return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey),
       
   638         aModifiersMask, aModifier,
       
   639         CaptureRequest::CaptureRequestTypeNormal);
       
   640 }
       
   641 
       
   642 /*!
       
   643  Deselects a given key from key capturing. Requires a S60 key code (TKeyCode).
       
   644  \param aKey A S60 key code (TKeyCode).
       
   645  \param aModifiersMask
       
   646  \param aModifier 
       
   647  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   648  */
       
   649 bool XqKeyCapture::cancelCaptureKey(TUint aKey,
       
   650     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   651 {
       
   652     return d->doCancelCapture(aKey, aModifiersMask, aModifier,
       
   653         CaptureRequest::CaptureRequestTypeNormal);
       
   654 }
       
   655 
       
   656 /*!
       
   657  Deselects a given key from capturing long pressing. Requires a Qt key code.
       
   658  \param aKey A Qt key.
       
   659  \param aModifiersMask
       
   660  \param aModifier 
       
   661  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   662  */
       
   663 bool XqKeyCapture::cancelCaptureLongKey(Qt::Key aKey,
       
   664     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
       
   665     XqKeyCapture::LongFlags aLongType)
       
   666 {
       
   667     return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask,
       
   668         aModifier, CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType);
       
   669 }
       
   670 
       
   671 /*!
       
   672  Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
       
   673  \param aKey A S60 key code (TKeyCode).
       
   674  \param aModifiersMask
       
   675  \param aModifier 
       
   676  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   677  */
       
   678 bool XqKeyCapture::cancelCaptureLongKey(TUint aKey,
       
   679     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
       
   680     XqKeyCapture::LongFlags aLongType)
       
   681 {
       
   682     return d->doCancelCapture(aKey, aModifiersMask, aModifier,
       
   683         CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType);
       
   684 }
       
   685 
       
   686 /*!
       
   687  Deselects a given key from capturing pressing up and down. Requires a Qt key code.
       
   688  \param aKey A Qt key.
       
   689  \param aModifiersMask
       
   690  \param aModifier 
       
   691  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   692  */
       
   693 bool XqKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey,
       
   694     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   695 {
       
   696     return d->doCancelCapture(d->mMapper->mapQtToS60ScanCodes(aKey),
       
   697         aModifiersMask, aModifier,
       
   698         CaptureRequest::CaptureRequestTypeUpAndDown);
       
   699 }
       
   700 
       
   701 /*!
       
   702  Deselects a given key from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
       
   703  \param aKey A S60 key scan code (TStdScanCode).
       
   704  \param aModifiersMask
       
   705  \param aModifier 
       
   706  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   707  */
       
   708 bool XqKeyCapture::cancelCaptureKeyUpAndDowns(TUint aKey,
       
   709     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   710 {
       
   711     return d->doCancelCapture(aKey, aModifiersMask, aModifier,
       
   712         CaptureRequest::CaptureRequestTypeUpAndDown);
       
   713 }
       
   714 
       
   715 /*!
       
   716  Returns latest error string.
       
   717  \retval Latest error string.
       
   718  */
       
   719 QString XqKeyCapture::errorString() const
       
   720 {
       
   721     return d->errorString();
       
   722 }
       
   723 
       
   724 /*!
       
   725  Returns latest error id.
       
   726  \retval Latest error id.
       
   727  */
       
   728 int XqKeyCapture::errorId() const
       
   729 {
       
   730     return d->errorId();
       
   731 }
       
   732 
       
   733 /*!
       
   734  Selects a given keys for capturing key pressing. Requires a Qt key code.
       
   735  \param list A Qt keys list.
       
   736  \param aModifiersMask
       
   737  \param aModifier 
       
   738  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   739  */
       
   740 bool XqKeyCapture::captureKey(XQKeyCaptureKeyList list, 
       
   741         Qt::KeyboardModifiers aModifiersMask,
       
   742         Qt::KeyboardModifiers aModifier)
       
   743 {
       
   744     Qt::Key key;
       
   745     bool result = true;
       
   746     foreach (key, list) {
       
   747         bool result = result & captureKey(key, aModifiersMask, aModifier);
       
   748     }
       
   749     return result;
       
   750 }
       
   751 
       
   752 /*!
       
   753  Selects a given keys for capturing key pressing. Requires a S60 key code (TKeyCode).
       
   754  \param list A S60 list of keys (TKeyCode codes).
       
   755  \param aModifiersMask
       
   756  \param aModifier 
       
   757  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   758  */
       
   759 bool XqKeyCapture::captureKey(XQKeyCaptureNativeKeyList list, 
       
   760         Qt::KeyboardModifiers aModifiersMask,
       
   761         Qt::KeyboardModifiers aModifier)
       
   762 {
       
   763     TUint key;
       
   764     bool result = true;
       
   765     foreach (key, list) {
       
   766         bool result = result & captureKey(key, aModifiersMask, aModifier);
       
   767     }
       
   768     return result;
       
   769 }
       
   770 
       
   771 /*!
       
   772  Selects a given keys for capturing long pressing. Requires a Qt key code.
       
   773  \param aKey A Qt  list of keys.
       
   774  \param aModifiersMask
       
   775  \param aModifier 
       
   776  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   777  */
       
   778 bool XqKeyCapture::captureLongKey(XQKeyCaptureKeyList list, 
       
   779         Qt::KeyboardModifiers aModifiersMask,
       
   780         Qt::KeyboardModifiers aModifier,
       
   781         XqKeyCapture::LongFlags aLongType)
       
   782 {
       
   783     Qt::Key key;
       
   784     bool result = true;
       
   785     foreach (key, list) {
       
   786         bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
       
   787     }
       
   788     return result;
       
   789 }
       
   790 
       
   791 /*!
       
   792  Selects a given keys for capturing long pressing. Requires a S60 key code (TKeyCode).
       
   793  \param list A S60 list of keys (TKeyCode codes).
       
   794  \param aModifiersMap
       
   795  \param aModifier 
       
   796  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   797  */
       
   798  bool XqKeyCapture::captureLongKey(XQKeyCaptureNativeKeyList list, 
       
   799         Qt::KeyboardModifiers aModifiersMask,
       
   800         Qt::KeyboardModifiers aModifier,
       
   801         XqKeyCapture::LongFlags aLongType)
       
   802 {
       
   803     TUint key;
       
   804     bool result = true;
       
   805     foreach (key, list) {
       
   806         bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
       
   807     }
       
   808     return result;
       
   809 }
       
   810 
       
   811 /*!
       
   812  Selects a given keys for capturing pressing up and down. Requires a Qt key code.
       
   813  \param list A Qt list of keys.
       
   814  \param aModifiersMask
       
   815  \param aModifier 
       
   816  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   817  */
       
   818 bool XqKeyCapture::captureKeyUpAndDowns(XQKeyCaptureKeyList list, 
       
   819         Qt::KeyboardModifiers aModifiersMask,
       
   820         Qt::KeyboardModifiers aModifier)
       
   821 {
       
   822     Qt::Key key;
       
   823     bool result = true;
       
   824     foreach (key, list) {
       
   825         bool result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
       
   826     }
       
   827     return result;
       
   828 }
       
   829 
       
   830 /*!
       
   831  Selects a given keys for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
       
   832  \param list A list of S60 key scan codes (TStdScanCode).
       
   833  \param aModifiersMask
       
   834  \param aModifier 
       
   835  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   836  */
       
   837 bool XqKeyCapture::captureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
       
   838         Qt::KeyboardModifiers aModifiersMask,
       
   839         Qt::KeyboardModifiers aModifier)
       
   840 {
       
   841     TUint key;
       
   842     bool result = true;
       
   843     foreach (key, list) {
       
   844         bool result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
       
   845     }
       
   846     return result;
       
   847 }
       
   848 
       
   849 /*!
       
   850  Deselects a given list of keys from key capturing. Requires a Qt key code.
       
   851  \param list  A Qt list of keys.
       
   852  \param aModifiersMask
       
   853  \param aModifier 
       
   854  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   855  */
       
   856 bool XqKeyCapture::cancelCaptureKey(XQKeyCaptureKeyList list, 
       
   857         Qt::KeyboardModifiers aModifiersMask,
       
   858         Qt::KeyboardModifiers aModifier)
       
   859 {
       
   860     Qt::Key key;
       
   861     bool result = true;
       
   862     foreach (key, list) {
       
   863         bool result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
       
   864     }
       
   865     return result;
       
   866 }
       
   867 
       
   868 /*!
       
   869  Deselects a given list of keys from key capturing. Requires a S60 key code (TKeyCode).
       
   870  \param list  A S60 list of key codes (TKeyCode).
       
   871  \param aModifiersMask
       
   872  \param aModifier 
       
   873  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   874  */
       
   875 bool XqKeyCapture::cancelCaptureKey(XQKeyCaptureNativeKeyList list, 
       
   876         Qt::KeyboardModifiers aModifiersMask,
       
   877         Qt::KeyboardModifiers aModifier)
       
   878 {
       
   879     TUint key;
       
   880     bool result = true;
       
   881     foreach (key, list) {
       
   882         bool result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
       
   883     }
       
   884     return result;
       
   885 }
       
   886 
       
   887 /*!
       
   888  Deselects a given list of keys from capturing long pressing. Requires a Qt key code.
       
   889  \param list A list of Qt keys.
       
   890  \param aModifiersMask
       
   891  \param aModifier 
       
   892  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   893  */
       
   894 bool XqKeyCapture::cancelCaptureLongKey(XQKeyCaptureKeyList list, 
       
   895         Qt::KeyboardModifiers aModifiersMask,
       
   896         Qt::KeyboardModifiers aModifier,
       
   897         XqKeyCapture::LongFlags aLongType)
       
   898 {
       
   899     Qt::Key key;
       
   900     bool result = true;
       
   901     foreach (key, list) {
       
   902         bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
       
   903     }
       
   904     return result;
       
   905 }
       
   906 
       
   907 /*!
       
   908  Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
       
   909  \paramlist A list of S60 key codes (TKeyCode).
       
   910  \param aModifiersMask
       
   911  \param aModifier 
       
   912  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   913  */
       
   914 bool XqKeyCapture::cancelCaptureLongKey(XQKeyCaptureNativeKeyList list, 
       
   915         Qt::KeyboardModifiers aModifiersMask,
       
   916         Qt::KeyboardModifiers aModifier,
       
   917         XqKeyCapture::LongFlags aLongType)
       
   918 {
       
   919     TUint key;
       
   920     bool result = true;
       
   921     foreach (key, list) {
       
   922         bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
       
   923     }
       
   924     return result;
       
   925 }
       
   926 
       
   927 /*!
       
   928  Deselects a list of given keys from capturing pressing up and down. Requires a Qt key codes.
       
   929  \param list A list of Qt keys.
       
   930  \param aModifiersMask
       
   931  \param aModifier 
       
   932  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   933  */
       
   934 bool XqKeyCapture::cancelCaptureKeyUpAndDowns(XQKeyCaptureKeyList list, 
       
   935         Qt::KeyboardModifiers aModifiersMask,
       
   936         Qt::KeyboardModifiers aModifier)
       
   937 {
       
   938     Qt::Key key;
       
   939     bool result = true;
       
   940     foreach (key, list) {
       
   941         bool result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
       
   942     }
       
   943     return result;
       
   944 }
       
   945 
       
   946 /*!
       
   947  Deselects a given list of keys from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
       
   948  \param aKey A S60 key scan code (TStdScanCode).
       
   949  \param aModifiersMask
       
   950  \param aModifier 
       
   951  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   952  */
       
   953  bool XqKeyCapture::cancelCaptureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
       
   954         Qt::KeyboardModifiers aModifiersMask,
       
   955         Qt::KeyboardModifiers aModifier)
       
   956 {
       
   957     TUint key;
       
   958     bool result = true;
       
   959     foreach (key, list) {
       
   960         bool result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
       
   961     }
       
   962     return result;
       
   963 }