97 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
98 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
98 */ |
99 */ |
99 bool XQKeyCapture::captureKey(Qt::Key aKey, |
100 bool XQKeyCapture::captureKey(Qt::Key aKey, |
100 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
101 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
101 { |
102 { |
102 return d->captureKey(aKey, aModifiersMask, aModifier); |
103 return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier, |
|
104 CaptureRequest::CaptureRequestTypeNormal); |
103 } |
105 } |
104 |
106 |
105 /*! |
107 /*! |
106 Selects a given key for capturing key pressing. Requires a S60 key code (TKeyCode). |
108 Selects a given key for capturing key pressing. Requires a S60 key code (TKeyCode). |
107 \param aKey A S60 key code (TKeyCode). |
109 \param aKey A S60 key code (TKeyCode). |
110 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
112 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
111 */ |
113 */ |
112 bool XQKeyCapture::captureKey(TUint aKey, |
114 bool XQKeyCapture::captureKey(TUint aKey, |
113 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
115 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
114 { |
116 { |
115 return d->captureKey(aKey, aModifiersMask, aModifier); |
117 return d->doCapture(aKey, aModifiersMask, aModifier, |
|
118 CaptureRequest::CaptureRequestTypeNormal); |
116 } |
119 } |
117 |
120 |
118 /*! |
121 /*! |
119 Selects a given key for capturing long pressing. Requires a Qt key code. |
122 Selects a given key for capturing long pressing. Requires a Qt key code. |
120 \param aKey A Qt key. |
123 \param aKey A Qt key. |
124 */ |
127 */ |
125 bool XQKeyCapture::captureLongKey(Qt::Key aKey, |
128 bool XQKeyCapture::captureLongKey(Qt::Key aKey, |
126 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
129 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
127 XQKeyCapture::LongFlags aLongType) |
130 XQKeyCapture::LongFlags aLongType) |
128 { |
131 { |
129 return d->captureLongKey(aKey, aModifiersMask, aModifier, aLongType); |
132 return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier, |
|
133 CaptureRequest::CaptureRequestTypeLong, aLongType); |
130 } |
134 } |
131 |
135 |
132 /*! |
136 /*! |
133 Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode). |
137 Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode). |
134 \param aKey A S60 key code (TKeyCode). |
138 \param aKey A S60 key code (TKeyCode). |
138 */ |
142 */ |
139 bool XQKeyCapture::captureLongKey(TUint aKey, |
143 bool XQKeyCapture::captureLongKey(TUint aKey, |
140 Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier, |
144 Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier, |
141 XQKeyCapture::LongFlags aLongType) |
145 XQKeyCapture::LongFlags aLongType) |
142 { |
146 { |
143 return d->captureLongKey(aKey, aModifiersMap, aModifier, aLongType); |
147 return d->doCapture(aKey, aModifiersMap, aModifier, |
|
148 CaptureRequest::CaptureRequestTypeLong, aLongType); |
144 } |
149 } |
145 |
150 |
146 /*! |
151 /*! |
147 Selects a given key for capturing pressing up and down. Requires a Qt key code. |
152 Selects a given key for capturing pressing up and down. Requires a Qt key code. |
148 \param aKey A Qt key. |
153 \param aKey A Qt key. |
151 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
156 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
152 */ |
157 */ |
153 bool XQKeyCapture::captureKeyUpAndDowns(Qt::Key aKey, |
158 bool XQKeyCapture::captureKeyUpAndDowns(Qt::Key aKey, |
154 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
159 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
155 { |
160 { |
156 return d->captureKeyUpAndDowns(aKey, aModifiersMask, aModifier); |
161 return d->doCapture(d->mMapper->mapQtToS60ScanCodes(aKey), aModifiersMask, |
|
162 aModifier, CaptureRequest::CaptureRequestTypeUpAndDown); |
157 } |
163 } |
158 |
164 |
159 /*! |
165 /*! |
160 Selects a given key for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode). |
166 Selects a given key for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode). |
161 \param aKey A S60 key scan code (TStdScanCode). |
167 \param aKey A S60 key scan code (TStdScanCode). |
164 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
170 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
165 */ |
171 */ |
166 bool XQKeyCapture::captureKeyUpAndDowns(TUint aKey, |
172 bool XQKeyCapture::captureKeyUpAndDowns(TUint aKey, |
167 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
173 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
168 { |
174 { |
169 return d->captureKeyUpAndDowns(aKey, aModifiersMask, aModifier); |
175 return d->doCapture(aKey, aModifiersMask, |
|
176 aModifier, CaptureRequest::CaptureRequestTypeUpAndDown); |
170 } |
177 } |
171 |
178 |
172 /*! |
179 /*! |
173 Deselects a given key from key capturing. Requires a Qt key code. |
180 Deselects a given key from key capturing. Requires a Qt key code. |
174 \param aKey A Qt key. |
181 \param aKey A Qt key. |
177 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
184 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
178 */ |
185 */ |
179 bool XQKeyCapture::cancelCaptureKey(Qt::Key aKey, |
186 bool XQKeyCapture::cancelCaptureKey(Qt::Key aKey, |
180 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
187 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
181 { |
188 { |
182 return d->cancelCaptureKey(aKey, aModifiersMask, aModifier); |
189 return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey), |
|
190 aModifiersMask, aModifier, |
|
191 CaptureRequest::CaptureRequestTypeNormal); |
183 } |
192 } |
184 |
193 |
185 /*! |
194 /*! |
186 Deselects a given key from key capturing. Requires a S60 key code (TKeyCode). |
195 Deselects a given key from key capturing. Requires a S60 key code (TKeyCode). |
187 \param aKey A S60 key code (TKeyCode). |
196 \param aKey A S60 key code (TKeyCode). |
190 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
199 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
191 */ |
200 */ |
192 bool XQKeyCapture::cancelCaptureKey(TUint aKey, |
201 bool XQKeyCapture::cancelCaptureKey(TUint aKey, |
193 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
202 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
194 { |
203 { |
195 return d->cancelCaptureKey(aKey, aModifiersMask, aModifier); |
204 return d->doCancelCapture(aKey, aModifiersMask, aModifier, |
|
205 CaptureRequest::CaptureRequestTypeNormal); |
196 } |
206 } |
197 |
207 |
198 /*! |
208 /*! |
199 Deselects a given key from capturing long pressing. Requires a Qt key code. |
209 Deselects a given key from capturing long pressing. Requires a Qt key code. |
200 \param aKey A Qt key. |
210 \param aKey A Qt key. |
204 */ |
214 */ |
205 bool XQKeyCapture::cancelCaptureLongKey(Qt::Key aKey, |
215 bool XQKeyCapture::cancelCaptureLongKey(Qt::Key aKey, |
206 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
216 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
207 XQKeyCapture::LongFlags aLongType) |
217 XQKeyCapture::LongFlags aLongType) |
208 { |
218 { |
209 return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier, |
219 return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, |
210 aLongType); |
220 aModifier, CaptureRequest::CaptureRequestTypeLong, aLongType); |
211 } |
221 } |
212 |
222 |
213 /*! |
223 /*! |
214 Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode). |
224 Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode). |
215 \param aKey A S60 key code (TKeyCode). |
225 \param aKey A S60 key code (TKeyCode). |
219 */ |
229 */ |
220 bool XQKeyCapture::cancelCaptureLongKey(TUint aKey, |
230 bool XQKeyCapture::cancelCaptureLongKey(TUint aKey, |
221 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
231 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
222 XQKeyCapture::LongFlags aLongType) |
232 XQKeyCapture::LongFlags aLongType) |
223 { |
233 { |
224 return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier, |
234 return d->doCancelCapture(aKey, aModifiersMask, aModifier, |
225 aLongType); |
235 CaptureRequest::CaptureRequestTypeLong, aLongType); |
226 } |
236 } |
227 |
237 |
228 /*! |
238 /*! |
229 Deselects a given key from capturing pressing up and down. Requires a Qt key code. |
239 Deselects a given key from capturing pressing up and down. Requires a Qt key code. |
230 \param aKey A Qt key. |
240 \param aKey A Qt key. |
233 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
243 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
234 */ |
244 */ |
235 bool XQKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey, |
245 bool XQKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey, |
236 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
246 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
237 { |
247 { |
238 return d->cancelCaptureKeyUpAndDowns(aKey, aModifiersMask, aModifier); |
248 return d->doCancelCapture(d->mMapper->mapQtToS60ScanCodes(aKey), |
|
249 aModifiersMask, aModifier, |
|
250 CaptureRequest::CaptureRequestTypeUpAndDown); |
239 } |
251 } |
240 |
252 |
241 /*! |
253 /*! |
242 Deselects a given key from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode). |
254 Deselects a given key from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode). |
243 \param aKey A S60 key scan code (TStdScanCode). |
255 \param aKey A S60 key scan code (TStdScanCode). |
246 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
258 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
247 */ |
259 */ |
248 bool XQKeyCapture::cancelCaptureKeyUpAndDowns(TUint aKey, |
260 bool XQKeyCapture::cancelCaptureKeyUpAndDowns(TUint aKey, |
249 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
261 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
250 { |
262 { |
251 return d->cancelCaptureKeyUpAndDowns(aKey, aModifiersMask, aModifier); |
263 return d->doCancelCapture(aKey, aModifiersMask, aModifier, |
|
264 CaptureRequest::CaptureRequestTypeUpAndDown); |
252 } |
265 } |
253 |
266 |
254 /*! |
267 /*! |
255 Returns latest error string. |
268 Returns latest error string. |
256 \retval Latest error string. |
269 \retval Latest error string. |
436 XQKeyCapture::LongFlags aLongType) |
449 XQKeyCapture::LongFlags aLongType) |
437 { |
450 { |
438 Qt::Key key; |
451 Qt::Key key; |
439 bool result = true; |
452 bool result = true; |
440 foreach (key, list) { |
453 foreach (key, list) { |
441 bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType); |
454 bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType); |
442 } |
455 } |
443 return result; |
456 return result; |
444 } |
457 } |
445 |
458 |
446 /*! |
459 /*! |
456 XQKeyCapture::LongFlags aLongType) |
469 XQKeyCapture::LongFlags aLongType) |
457 { |
470 { |
458 TUint key; |
471 TUint key; |
459 bool result = true; |
472 bool result = true; |
460 foreach (key, list) { |
473 foreach (key, list) { |
461 bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType); |
474 bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType); |
462 } |
475 } |
463 return result; |
476 return result; |
464 } |
477 } |
465 |
478 |
466 /*! |
479 /*! |
523 \param aKey A Qt key. |
536 \param aKey A Qt key. |
524 \param aModifiersMask |
537 \param aModifiersMask |
525 \param aModifier |
538 \param aModifier |
526 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
539 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
527 */ |
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 */ |
528 bool XqKeyCapture::captureKey(Qt::Key aKey, |
548 bool XqKeyCapture::captureKey(Qt::Key aKey, |
529 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
549 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
530 { |
550 { |
531 return d->captureKey(aKey, aModifiersMask, aModifier); |
551 return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier, |
|
552 CaptureRequest::CaptureRequestTypeNormal); |
532 } |
553 } |
533 |
554 |
534 /*! |
555 /*! |
535 Selects a given key for capturing key pressing. Requires a S60 key code (TKeyCode). |
556 Selects a given key for capturing key pressing. Requires a S60 key code (TKeyCode). |
536 \param aKey A S60 key code (TKeyCode). |
557 \param aKey A S60 key code (TKeyCode). |
539 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
560 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
540 */ |
561 */ |
541 bool XqKeyCapture::captureKey(TUint aKey, |
562 bool XqKeyCapture::captureKey(TUint aKey, |
542 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
563 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
543 { |
564 { |
544 return d->captureKey(aKey, aModifiersMask, aModifier); |
565 return d->doCapture(aKey, aModifiersMask, aModifier, |
|
566 CaptureRequest::CaptureRequestTypeNormal); |
545 } |
567 } |
546 |
568 |
547 /*! |
569 /*! |
548 Selects a given key for capturing long pressing. Requires a Qt key code. |
570 Selects a given key for capturing long pressing. Requires a Qt key code. |
549 \param aKey A Qt key. |
571 \param aKey A Qt key. |
553 */ |
575 */ |
554 bool XqKeyCapture::captureLongKey(Qt::Key aKey, |
576 bool XqKeyCapture::captureLongKey(Qt::Key aKey, |
555 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
577 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
556 XqKeyCapture::LongFlags aLongType) |
578 XqKeyCapture::LongFlags aLongType) |
557 { |
579 { |
558 return d->captureLongKey(aKey, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType)); |
580 return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier, |
|
581 CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType); |
559 } |
582 } |
560 |
583 |
561 /*! |
584 /*! |
562 Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode). |
585 Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode). |
563 \param aKey A S60 key code (TKeyCode). |
586 \param aKey A S60 key code (TKeyCode). |
567 */ |
590 */ |
568 bool XqKeyCapture::captureLongKey(TUint aKey, |
591 bool XqKeyCapture::captureLongKey(TUint aKey, |
569 Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier, |
592 Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier, |
570 XqKeyCapture::LongFlags aLongType) |
593 XqKeyCapture::LongFlags aLongType) |
571 { |
594 { |
572 return d->captureLongKey(aKey, aModifiersMap, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType)); |
595 return d->doCapture(aKey, aModifiersMap, aModifier, |
|
596 CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType); |
573 } |
597 } |
574 |
598 |
575 /*! |
599 /*! |
576 Selects a given key for capturing pressing up and down. Requires a Qt key code. |
600 Selects a given key for capturing pressing up and down. Requires a Qt key code. |
577 \param aKey A Qt key. |
601 \param aKey A Qt key. |
580 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
604 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
581 */ |
605 */ |
582 bool XqKeyCapture::captureKeyUpAndDowns(Qt::Key aKey, |
606 bool XqKeyCapture::captureKeyUpAndDowns(Qt::Key aKey, |
583 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
607 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
584 { |
608 { |
585 return d->captureKeyUpAndDowns(aKey, aModifiersMask, aModifier); |
609 return d->doCapture(d->mMapper->mapQtToS60ScanCodes(aKey), aModifiersMask, |
|
610 aModifier, CaptureRequest::CaptureRequestTypeUpAndDown); |
586 } |
611 } |
587 |
612 |
588 /*! |
613 /*! |
589 Selects a given key for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode). |
614 Selects a given key for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode). |
590 \param aKey A S60 key scan code (TStdScanCode). |
615 \param aKey A S60 key scan code (TStdScanCode). |
593 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
618 \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false. |
594 */ |
619 */ |
595 bool XqKeyCapture::captureKeyUpAndDowns(TUint aKey, |
620 bool XqKeyCapture::captureKeyUpAndDowns(TUint aKey, |
596 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
621 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
597 { |
622 { |
598 return d->captureKeyUpAndDowns(aKey, aModifiersMask, aModifier); |
623 return d->doCapture(aKey, aModifiersMask, |
|
624 aModifier, CaptureRequest::CaptureRequestTypeUpAndDown); |
599 } |
625 } |
600 |
626 |
601 /*! |
627 /*! |
602 Deselects a given key from key capturing. Requires a Qt key code. |
628 Deselects a given key from key capturing. Requires a Qt key code. |
603 \param aKey A Qt key. |
629 \param aKey A Qt key. |
606 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
632 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
607 */ |
633 */ |
608 bool XqKeyCapture::cancelCaptureKey(Qt::Key aKey, |
634 bool XqKeyCapture::cancelCaptureKey(Qt::Key aKey, |
609 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
635 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
610 { |
636 { |
611 return d->cancelCaptureKey(aKey, aModifiersMask, aModifier); |
637 return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey), |
|
638 aModifiersMask, aModifier, |
|
639 CaptureRequest::CaptureRequestTypeNormal); |
612 } |
640 } |
613 |
641 |
614 /*! |
642 /*! |
615 Deselects a given key from key capturing. Requires a S60 key code (TKeyCode). |
643 Deselects a given key from key capturing. Requires a S60 key code (TKeyCode). |
616 \param aKey A S60 key code (TKeyCode). |
644 \param aKey A S60 key code (TKeyCode). |
619 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
647 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
620 */ |
648 */ |
621 bool XqKeyCapture::cancelCaptureKey(TUint aKey, |
649 bool XqKeyCapture::cancelCaptureKey(TUint aKey, |
622 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
650 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
623 { |
651 { |
624 return d->cancelCaptureKey(aKey, aModifiersMask, aModifier); |
652 return d->doCancelCapture(aKey, aModifiersMask, aModifier, |
|
653 CaptureRequest::CaptureRequestTypeNormal); |
625 } |
654 } |
626 |
655 |
627 /*! |
656 /*! |
628 Deselects a given key from capturing long pressing. Requires a Qt key code. |
657 Deselects a given key from capturing long pressing. Requires a Qt key code. |
629 \param aKey A Qt key. |
658 \param aKey A Qt key. |
633 */ |
662 */ |
634 bool XqKeyCapture::cancelCaptureLongKey(Qt::Key aKey, |
663 bool XqKeyCapture::cancelCaptureLongKey(Qt::Key aKey, |
635 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
664 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
636 XqKeyCapture::LongFlags aLongType) |
665 XqKeyCapture::LongFlags aLongType) |
637 { |
666 { |
638 return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier, |
667 return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, |
639 static_cast<XQKeyCapture::LongFlags>(aLongType)); |
668 aModifier, CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType); |
640 } |
669 } |
641 |
670 |
642 /*! |
671 /*! |
643 Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode). |
672 Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode). |
644 \param aKey A S60 key code (TKeyCode). |
673 \param aKey A S60 key code (TKeyCode). |
648 */ |
677 */ |
649 bool XqKeyCapture::cancelCaptureLongKey(TUint aKey, |
678 bool XqKeyCapture::cancelCaptureLongKey(TUint aKey, |
650 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
679 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier, |
651 XqKeyCapture::LongFlags aLongType) |
680 XqKeyCapture::LongFlags aLongType) |
652 { |
681 { |
653 return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier, |
682 return d->doCancelCapture(aKey, aModifiersMask, aModifier, |
654 static_cast<XQKeyCapture::LongFlags>(aLongType)); |
683 CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType); |
655 } |
684 } |
656 |
685 |
657 /*! |
686 /*! |
658 Deselects a given key from capturing pressing up and down. Requires a Qt key code. |
687 Deselects a given key from capturing pressing up and down. Requires a Qt key code. |
659 \param aKey A Qt key. |
688 \param aKey A Qt key. |
662 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
691 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
663 */ |
692 */ |
664 bool XqKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey, |
693 bool XqKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey, |
665 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
694 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
666 { |
695 { |
667 return d->cancelCaptureKeyUpAndDowns(aKey, aModifiersMask, aModifier); |
696 return d->doCancelCapture(d->mMapper->mapQtToS60ScanCodes(aKey), |
|
697 aModifiersMask, aModifier, |
|
698 CaptureRequest::CaptureRequestTypeUpAndDown); |
668 } |
699 } |
669 |
700 |
670 /*! |
701 /*! |
671 Deselects a given key from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode). |
702 Deselects a given key from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode). |
672 \param aKey A S60 key scan code (TStdScanCode). |
703 \param aKey A S60 key scan code (TStdScanCode). |
675 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
706 \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false. |
676 */ |
707 */ |
677 bool XqKeyCapture::cancelCaptureKeyUpAndDowns(TUint aKey, |
708 bool XqKeyCapture::cancelCaptureKeyUpAndDowns(TUint aKey, |
678 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
709 Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier) |
679 { |
710 { |
680 return d->cancelCaptureKeyUpAndDowns(aKey, aModifiersMask, aModifier); |
711 return d->doCancelCapture(aKey, aModifiersMask, aModifier, |
|
712 CaptureRequest::CaptureRequestTypeUpAndDown); |
681 } |
713 } |
682 |
714 |
683 /*! |
715 /*! |
684 Returns latest error string. |
716 Returns latest error string. |
685 \retval Latest error string. |
717 \retval Latest error string. |
749 XqKeyCapture::LongFlags aLongType) |
781 XqKeyCapture::LongFlags aLongType) |
750 { |
782 { |
751 Qt::Key key; |
783 Qt::Key key; |
752 bool result = true; |
784 bool result = true; |
753 foreach (key, list) { |
785 foreach (key, list) { |
754 bool result = result & d->captureLongKey(key, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType)); |
786 bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType); |
755 } |
787 } |
756 return result; |
788 return result; |
757 } |
789 } |
758 |
790 |
759 /*! |
791 /*! |
769 XqKeyCapture::LongFlags aLongType) |
801 XqKeyCapture::LongFlags aLongType) |
770 { |
802 { |
771 TUint key; |
803 TUint key; |
772 bool result = true; |
804 bool result = true; |
773 foreach (key, list) { |
805 foreach (key, list) { |
774 bool result = result & d->captureLongKey(key, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType)); |
806 bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType); |
775 } |
807 } |
776 return result; |
808 return result; |
777 } |
809 } |
778 |
810 |
779 /*! |
811 /*! |
865 XqKeyCapture::LongFlags aLongType) |
897 XqKeyCapture::LongFlags aLongType) |
866 { |
898 { |
867 Qt::Key key; |
899 Qt::Key key; |
868 bool result = true; |
900 bool result = true; |
869 foreach (key, list) { |
901 foreach (key, list) { |
870 bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType)); |
902 bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType); |
871 } |
903 } |
872 return result; |
904 return result; |
873 } |
905 } |
874 |
906 |
875 /*! |
907 /*! |
885 XqKeyCapture::LongFlags aLongType) |
917 XqKeyCapture::LongFlags aLongType) |
886 { |
918 { |
887 TUint key; |
919 TUint key; |
888 bool result = true; |
920 bool result = true; |
889 foreach (key, list) { |
921 foreach (key, list) { |
890 bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType)); |
922 bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType); |
891 } |
923 } |
892 return result; |
924 return result; |
893 } |
925 } |
894 |
926 |
895 /*! |
927 /*! |