1 | // Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "qkeyboardhandler.h" |
5 | #include "qkeyboardhandler_p.h" |
6 | |
7 | #include <Qt3DInput/qkeyboarddevice.h> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | |
12 | namespace Qt3DInput { |
13 | |
14 | using namespace Qt3DCore; |
15 | |
16 | namespace { |
17 | |
18 | |
19 | // SigMap and the sigMap table are taken from QQ2 QQuickKeysAttached |
20 | struct SigMap { |
21 | int key; |
22 | const char *sig; |
23 | }; |
24 | |
25 | const SigMap sigMap[] = { |
26 | { .key: Qt::Key_Left, .sig: "leftPressed" }, |
27 | { .key: Qt::Key_Right, .sig: "rightPressed" }, |
28 | { .key: Qt::Key_Up, .sig: "upPressed" }, |
29 | { .key: Qt::Key_Down, .sig: "downPressed" }, |
30 | { .key: Qt::Key_Tab, .sig: "tabPressed" }, |
31 | { .key: Qt::Key_Backtab, .sig: "backtabPressed" }, |
32 | { .key: Qt::Key_Asterisk, .sig: "asteriskPressed" }, |
33 | { .key: Qt::Key_NumberSign, .sig: "numberSignPressed" }, |
34 | { .key: Qt::Key_Escape, .sig: "escapePressed" }, |
35 | { .key: Qt::Key_Return, .sig: "returnPressed" }, |
36 | { .key: Qt::Key_Enter, .sig: "enterPressed" }, |
37 | { .key: Qt::Key_Delete, .sig: "deletePressed" }, |
38 | { .key: Qt::Key_Space, .sig: "spacePressed" }, |
39 | { .key: Qt::Key_Back, .sig: "backPressed" }, |
40 | { .key: Qt::Key_Cancel, .sig: "cancelPressed" }, |
41 | { .key: Qt::Key_Select, .sig: "selectPressed" }, |
42 | { .key: Qt::Key_Yes, .sig: "yesPressed" }, |
43 | { .key: Qt::Key_No, .sig: "noPressed" }, |
44 | { .key: Qt::Key_Context1, .sig: "context1Pressed" }, |
45 | { .key: Qt::Key_Context2, .sig: "context2Pressed" }, |
46 | { .key: Qt::Key_Context3, .sig: "context3Pressed" }, |
47 | { .key: Qt::Key_Context4, .sig: "context4Pressed" }, |
48 | { .key: Qt::Key_Call, .sig: "callPressed" }, |
49 | { .key: Qt::Key_Hangup, .sig: "hangupPressed" }, |
50 | { .key: Qt::Key_Flip, .sig: "flipPressed" }, |
51 | { .key: Qt::Key_Menu, .sig: "menuPressed" }, |
52 | { .key: Qt::Key_VolumeUp, .sig: "volumeUpPressed" }, |
53 | { .key: Qt::Key_VolumeDown, .sig: "volumeDownPressed" }, |
54 | { .key: 0, .sig: 0 } |
55 | }; |
56 | |
57 | const QByteArray keyToSignal(int key) |
58 | { |
59 | QByteArray keySignal; |
60 | if (key >= Qt::Key_0 && key <= Qt::Key_9) { |
61 | keySignal = "digit0Pressed" ; |
62 | keySignal[5] = '0' + (key - Qt::Key_0); |
63 | } else { |
64 | int i = 0; |
65 | while (sigMap[i].key && sigMap[i].key != key) |
66 | ++i; |
67 | keySignal = sigMap[i].sig; |
68 | } |
69 | return keySignal; |
70 | } |
71 | |
72 | } // anonymous |
73 | |
74 | QKeyboardHandlerPrivate::QKeyboardHandlerPrivate() |
75 | : QComponentPrivate() |
76 | , m_keyboardDevice(nullptr) |
77 | , m_focus(false) |
78 | { |
79 | m_shareable = false; |
80 | } |
81 | |
82 | QKeyboardHandlerPrivate::~QKeyboardHandlerPrivate() |
83 | { |
84 | } |
85 | |
86 | void QKeyboardHandlerPrivate::keyEvent(QKeyEvent *event) |
87 | { |
88 | Q_Q(QKeyboardHandler); |
89 | if (event->type() == QEvent::KeyPress) { |
90 | emit q->pressed(event); |
91 | |
92 | QByteArray keySignal = keyToSignal(key: event->key()); |
93 | if (!keySignal.isEmpty()) { |
94 | keySignal += "(Qt3DInput::QKeyEvent*)" ; |
95 | // TO DO: Finding if the signal is connected to anything before doing the invocation |
96 | // could be an improvement |
97 | // That's what QQ2 does but since it accesses QML private classes to do so, that may not be |
98 | // applicable in our case |
99 | int idx = QKeyboardHandler::staticMetaObject.indexOfSignal(signal: keySignal); |
100 | q->metaObject()->method(index: idx).invoke(obj: q, c: Qt::DirectConnection, Q_ARG(QKeyEvent*, event)); |
101 | } |
102 | } else if (event->type() == QEvent::KeyRelease) { |
103 | emit q->released(event); |
104 | } |
105 | } |
106 | |
107 | |
108 | /*! |
109 | \class Qt3DInput::QKeyboardHandler |
110 | \inmodule Qt3DInput |
111 | \brief Provides keyboard event notification. |
112 | \since 5.5 |
113 | */ |
114 | |
115 | /*! |
116 | \qmltype KeyboardHandler |
117 | \inqmlmodule Qt3D.Input |
118 | \nativetype Qt3DInput::QKeyboardHandler |
119 | \inherits Component3D |
120 | \brief QML frontend for QKeyboardHandler C++ class. |
121 | \since 5.5 |
122 | */ |
123 | |
124 | /*! |
125 | Constructs a new QKeyboardHandler instance with parent \a parent. |
126 | */ |
127 | QKeyboardHandler::QKeyboardHandler(QNode *parent) |
128 | : QComponent(*new QKeyboardHandlerPrivate, parent) |
129 | { |
130 | } |
131 | |
132 | /*! \internal */ |
133 | QKeyboardHandler::~QKeyboardHandler() |
134 | { |
135 | } |
136 | |
137 | /*! |
138 | \qmlproperty KeyboardDevice Qt3D.Input::KeyboardHandler::sourceDevice |
139 | */ |
140 | |
141 | /*! |
142 | \property Qt3DInput::QKeyboardHandler::sourceDevice |
143 | |
144 | Holds the keyboard device of the QKeyboardHandler. Without a valid device, |
145 | the QKeyboardHandler won't receive any event. |
146 | */ |
147 | void QKeyboardHandler::setSourceDevice(QKeyboardDevice *keyboardDevice) |
148 | { |
149 | Q_D(QKeyboardHandler); |
150 | if (d->m_keyboardDevice != keyboardDevice) { |
151 | |
152 | if (d->m_keyboardDevice) |
153 | d->unregisterDestructionHelper(node: d->m_keyboardDevice); |
154 | |
155 | if (keyboardDevice && !keyboardDevice->parent()) |
156 | keyboardDevice->setParent(this); |
157 | |
158 | d->m_keyboardDevice = keyboardDevice; |
159 | |
160 | // Ensures proper bookkeeping |
161 | if (d->m_keyboardDevice) |
162 | d->registerDestructionHelper(node: keyboardDevice, func: &QKeyboardHandler::setSourceDevice, d->m_keyboardDevice); |
163 | |
164 | emit sourceDeviceChanged(keyboardDevice); |
165 | } |
166 | } |
167 | |
168 | /*! |
169 | Returns the current keyboard device. |
170 | */ |
171 | QKeyboardDevice *QKeyboardHandler::sourceDevice() const |
172 | { |
173 | Q_D(const QKeyboardHandler); |
174 | return d->m_keyboardDevice; |
175 | } |
176 | |
177 | /*! |
178 | \qmlproperty bool Qt3D.Input::KeyboardHandler::focus |
179 | */ |
180 | |
181 | /*! |
182 | \property Qt3DInput::QKeyboardHandler::focus |
183 | |
184 | Holds \c true if the QKeyboardHandlers has focus. |
185 | */ |
186 | bool QKeyboardHandler::focus() const |
187 | { |
188 | Q_D(const QKeyboardHandler); |
189 | return d->m_focus; |
190 | } |
191 | |
192 | /*! |
193 | Sets the focus to \a focus. If focus is not currently set to \c true, |
194 | this component will receive keyboard focus. |
195 | */ |
196 | void QKeyboardHandler::setFocus(bool focus) |
197 | { |
198 | Q_D(QKeyboardHandler); |
199 | if (d->m_focus != focus) { |
200 | d->m_focus = focus; |
201 | emit focusChanged(focus); |
202 | } |
203 | } |
204 | |
205 | /*! |
206 | \qmlsignal Qt3D.Input::KeyboardHandler::digit0Pressed(KeyEvent event) |
207 | |
208 | This signal is emitted when the 0 key is pressed with the event details being contained within \a event. |
209 | */ |
210 | |
211 | /*! |
212 | \qmlsignal Qt3D.Input::KeyboardHandler::digit1Pressed(KeyEvent event) |
213 | |
214 | This signal is emitted when the 1 key is pressed with the event details being contained within \a event. |
215 | */ |
216 | |
217 | /*! |
218 | \qmlsignal Qt3D.Input::KeyboardHandler::digit2Pressed(KeyEvent event) |
219 | |
220 | This signal is emitted when the 2 key is pressed with the event details being contained within \a event. |
221 | */ |
222 | |
223 | /*! |
224 | \qmlsignal Qt3D.Input::KeyboardHandler::digit3Pressed(KeyEvent event) |
225 | |
226 | This signal is emitted when the 3 key is pressed with the event details being contained within \a event. |
227 | */ |
228 | |
229 | /*! |
230 | \qmlsignal Qt3D.Input::KeyboardHandler::digit4Pressed(KeyEvent event) |
231 | |
232 | This signal is emitted when the 4 key is pressed with the event details being contained within \a event. |
233 | */ |
234 | |
235 | /*! |
236 | \qmlsignal Qt3D.Input::KeyboardHandler::digit5Pressed(KeyEvent event) |
237 | |
238 | This signal is emitted when the 5 key is pressed with the event details being contained within \a event. |
239 | */ |
240 | |
241 | /*! |
242 | \qmlsignal Qt3D.Input::KeyboardHandler::digit6Pressed(KeyEvent event) |
243 | |
244 | This signal is emitted when the 6 key is pressed with the event details being contained within \a event. |
245 | */ |
246 | |
247 | /*! |
248 | \qmlsignal Qt3D.Input::KeyboardHandler::digit7Pressed(KeyEvent event) |
249 | |
250 | This signal is emitted when the 7 key is pressed with the event details being contained within \a event. |
251 | */ |
252 | |
253 | /*! |
254 | \qmlsignal Qt3D.Input::KeyboardHandler::digit8Pressed(KeyEvent event) |
255 | |
256 | This signal is emitted when the 8 key is pressed with the event details being contained within \a event. |
257 | */ |
258 | |
259 | /*! |
260 | \qmlsignal Qt3D.Input::KeyboardHandler::digit9Pressed(KeyEvent event) |
261 | |
262 | This signal is emitted when the 9 key is pressed with the event details being contained within \a event. |
263 | */ |
264 | |
265 | /*! |
266 | \qmlsignal Qt3D.Input::KeyboardHandler::leftPressed(KeyEvent event) |
267 | |
268 | This signal is emitted when the left key is pressed with the event details being contained within \a event. |
269 | */ |
270 | |
271 | /*! |
272 | \qmlsignal Qt3D.Input::KeyboardHandler::rightPressed(KeyEvent event) |
273 | |
274 | This signal is emitted when the right key is pressed with the event details being contained within \a event |
275 | */ |
276 | |
277 | /*! |
278 | \qmlsignal Qt3D.Input::KeyboardHandler::upPressed(KeyEvent event) |
279 | |
280 | This signal is emitted when the up key is pressed with the event details being contained within \a event. |
281 | */ |
282 | |
283 | /*! |
284 | \qmlsignal Qt3D.Input::KeyboardHandler::downPressed(KeyEvent event) |
285 | |
286 | This signal is emitted when the down key is pressed with the event details being contained within \a event. |
287 | */ |
288 | |
289 | /*! |
290 | \qmlsignal Qt3D.Input::KeyboardHandler::tabPressed(KeyEvent event) |
291 | |
292 | This signal is emitted when the tab key is pressed with the event details being contained within \a event. |
293 | */ |
294 | |
295 | /*! |
296 | \qmlsignal Qt3D.Input::KeyboardHandler::backtabPressed(KeyEvent event) |
297 | |
298 | This signal is emitted when the backtab key is pressed with the event details being contained within \a event. |
299 | */ |
300 | |
301 | /*! |
302 | \qmlsignal Qt3D.Input::KeyboardHandler::asteriskPressed(KeyEvent event) |
303 | |
304 | This signal is emitted when the * key is pressed with the event details being contained within \a event. |
305 | */ |
306 | |
307 | /*! |
308 | \qmlsignal Qt3D.Input::KeyboardHandler::numberSignPressed(KeyEvent event) |
309 | |
310 | This signal is emitted when the number sign key is pressed with the event details being contained within \a event. |
311 | */ |
312 | |
313 | /*! |
314 | \qmlsignal Qt3D.Input::KeyboardHandler::escapePressed(KeyEvent event) |
315 | |
316 | This signal is emitted when the escape key is pressed with the event details being contained within \a event. |
317 | */ |
318 | |
319 | /*! |
320 | \qmlsignal Qt3D.Input::KeyboardHandler::returnPressed(KeyEvent event) |
321 | |
322 | This signal is emitted when the return key is pressed with the event details being contained within \a event. |
323 | |
324 | */ |
325 | |
326 | /*! |
327 | \qmlsignal Qt3D.Input::KeyboardHandler::enterPressed(KeyEvent event) |
328 | |
329 | This signal is emitted when the enter key is pressed with the event details being contained within \a event. |
330 | */ |
331 | |
332 | /*! |
333 | \qmlsignal Qt3D.Input::KeyboardHandler::deletePressed(KeyEvent event) |
334 | |
335 | This signal is emitted when the delete key is pressed with the event details being contained within \a event. |
336 | */ |
337 | |
338 | /*! |
339 | \qmlsignal Qt3D.Input::KeyboardHandler::spacePressed(KeyEvent event) |
340 | |
341 | This signal is emitted when the space key is pressed with the event details being contained within \a event. |
342 | */ |
343 | |
344 | /*! |
345 | \qmlsignal Qt3D.Input::KeyboardHandler::backPressed(KeyEvent event) |
346 | |
347 | This signal is emitted when the back key is pressed with the event details being contained within \a event. |
348 | */ |
349 | |
350 | /*! |
351 | \qmlsignal Qt3D.Input::KeyboardHandler::cancelPressed(KeyEvent event) |
352 | |
353 | This signal is emitted when the cancel key is pressed with the event details being contained within \a event. |
354 | */ |
355 | |
356 | /*! |
357 | \qmlsignal Qt3D.Input::KeyboardHandler::selectPressed(KeyEvent event) |
358 | |
359 | This signal is emitted when the select key is pressed with the event details being contained within \a event. |
360 | */ |
361 | |
362 | /*! |
363 | \qmlsignal Qt3D.Input::KeyboardHandler::yesPressed(KeyEvent event) |
364 | |
365 | This signal is emitted when the yes key is pressed with the event details being contained within \a event. |
366 | */ |
367 | |
368 | /*! |
369 | \qmlsignal Qt3D.Input::KeyboardHandler::noPressed(KeyEvent event) |
370 | |
371 | This signal is emitted when the yes key is pressed with the event details being contained within \a event. |
372 | */ |
373 | |
374 | /*! |
375 | \qmlsignal Qt3D.Input::KeyboardHandler::context1Pressed(KeyEvent event) |
376 | |
377 | This signal is emitted when the context 1 key is pressed with the event details being contained within \a event. |
378 | */ |
379 | |
380 | /*! |
381 | \qmlsignal Qt3D.Input::KeyboardHandler::context2Pressed(KeyEvent event) |
382 | |
383 | This signal is emitted when the context 2 key is pressed with the event details being contained within \a event. |
384 | */ |
385 | |
386 | /*! |
387 | \qmlsignal Qt3D.Input::KeyboardHandler::context3Pressed(KeyEvent event) |
388 | |
389 | This signal is emitted when the context 2 key is pressed with the event details being contained within \a event. |
390 | */ |
391 | |
392 | /*! |
393 | \qmlsignal Qt3D.Input::KeyboardHandler::context4Pressed(KeyEvent event) |
394 | |
395 | This signal is emitted when the context 4 key is pressed with the event details being contained within \a event. |
396 | */ |
397 | |
398 | /*! |
399 | \qmlsignal Qt3D.Input::KeyboardHandler::callPressed(KeyEvent event) |
400 | |
401 | This signal is emitted when the call key is pressed with the event details being contained within \a event. |
402 | */ |
403 | |
404 | /*! |
405 | \qmlsignal Qt3D.Input::KeyboardHandler::hangupPressed(KeyEvent event) |
406 | |
407 | This signal is emitted when the hangup key is pressed with the event details being contained within \a event. |
408 | */ |
409 | |
410 | /*! |
411 | \qmlsignal Qt3D.Input::KeyboardHandler::flipPressed(KeyEvent event) |
412 | |
413 | This signal is emitted when the flip key is pressed with the event details being contained within \a event. |
414 | */ |
415 | |
416 | /*! |
417 | \qmlsignal Qt3D.Input::KeyboardHandler::menuPressed(KeyEvent event) |
418 | |
419 | This signal is emitted when the menu key is pressed with the event details being contained within \a event. |
420 | */ |
421 | |
422 | /*! |
423 | \qmlsignal Qt3D.Input::KeyboardHandler::volumeUpPressed(KeyEvent event) |
424 | |
425 | This signal is emitted when the volume up key is pressed with the event details being contained within \a event. |
426 | */ |
427 | |
428 | /*! |
429 | \qmlsignal Qt3D.Input::KeyboardHandler::volumeDownPressed(KeyEvent event) |
430 | |
431 | This signal is emitted when the volume down key is pressed with the event details being contained within \a event. |
432 | */ |
433 | |
434 | /*! |
435 | \qmlsignal Qt3D.Input::KeyboardHandler::pressed(KeyEvent event) |
436 | |
437 | This signal is emitted when a key is pressed with the event details being contained within \a event. |
438 | */ |
439 | |
440 | /*! |
441 | \qmlsignal Qt3D.Input::KeyboardHandler::released(KeyEvent event) |
442 | |
443 | This signal is emitted when a key is released with the event details being contained within \a event. |
444 | */ |
445 | |
446 | /*! |
447 | \fn Qt3DInput::QKeyboardHandler::digit0Pressed(Qt3DInput::QKeyEvent *event) |
448 | |
449 | This signal is emitted when the 0 key is pressed with the event details being contained within \a event. |
450 | */ |
451 | |
452 | /*! |
453 | \fn Qt3DInput::QKeyboardHandler::digit1Pressed(Qt3DInput::QKeyEvent *event) |
454 | |
455 | This signal is emitted when the 1 key is pressed with the event details being contained within \a event. |
456 | */ |
457 | |
458 | /*! |
459 | \fn Qt3DInput::QKeyboardHandler::digit2Pressed(Qt3DInput::QKeyEvent *event) |
460 | |
461 | This signal is emitted when the 2 key is pressed with the event details being contained within \a event. |
462 | */ |
463 | |
464 | /*! |
465 | \fn Qt3DInput::QKeyboardHandler::digit3Pressed(Qt3DInput::QKeyEvent *event) |
466 | |
467 | This signal is emitted when the 3 key is pressed with the event details being contained within \a event. |
468 | */ |
469 | |
470 | /*! |
471 | \fn Qt3DInput::QKeyboardHandler::digit4Pressed(Qt3DInput::QKeyEvent *event) |
472 | |
473 | This signal is emitted when the 4 key is pressed with the event details being contained within \a event. |
474 | */ |
475 | |
476 | /*! |
477 | \fn Qt3DInput::QKeyboardHandler::digit5Pressed(Qt3DInput::QKeyEvent *event) |
478 | |
479 | This signal is emitted when the 5 key is pressed with the event details being contained within \a event. |
480 | */ |
481 | |
482 | /*! |
483 | \fn Qt3DInput::QKeyboardHandler::digit6Pressed(Qt3DInput::QKeyEvent *event) |
484 | |
485 | This signal is emitted when the 6 key is pressed with the event details being contained within \a event. |
486 | */ |
487 | |
488 | /*! |
489 | \fn Qt3DInput::QKeyboardHandler::digit7Pressed(Qt3DInput::QKeyEvent *event) |
490 | |
491 | This signal is emitted when the 7 key is pressed with the event details being contained within \a event. |
492 | */ |
493 | |
494 | /*! |
495 | \fn Qt3DInput::QKeyboardHandler::digit8Pressed(Qt3DInput::QKeyEvent *event) |
496 | |
497 | This signal is emitted when the 8 key is pressed with the event details being contained within \a event. |
498 | */ |
499 | |
500 | /*! |
501 | \fn Qt3DInput::QKeyboardHandler::digit9Pressed(Qt3DInput::QKeyEvent *event) |
502 | |
503 | This signal is emitted when the 9 key is pressed with the event details being contained within \a event |
504 | */ |
505 | |
506 | /*! |
507 | \fn Qt3DInput::QKeyboardHandler::leftPressed(Qt3DInput::QKeyEvent *event) |
508 | |
509 | This signal is emitted when the left key is pressed with the event details being contained within \a event. |
510 | */ |
511 | |
512 | /*! |
513 | \fn Qt3DInput::QKeyboardHandler::rightPressed(Qt3DInput::QKeyEvent *event) |
514 | |
515 | This signal is emitted when the right key is pressed with the event details being contained within \a event. |
516 | */ |
517 | |
518 | /*! |
519 | \fn Qt3DInput::QKeyboardHandler::upPressed(Qt3DInput::QKeyEvent *event) |
520 | |
521 | This signal is emitted when the up key is pressed with the event details being contained within \a event. |
522 | */ |
523 | |
524 | /*! |
525 | \fn Qt3DInput::QKeyboardHandler::downPressed(Qt3DInput::QKeyEvent *event) |
526 | |
527 | This signal is emitted when the down key is pressed with the event details being contained within \a event. |
528 | */ |
529 | |
530 | /*! |
531 | \fn Qt3DInput::QKeyboardHandler::tabPressed(Qt3DInput::QKeyEvent *event) |
532 | |
533 | This signal is emitted when the tab key is pressed with the event details being contained within \a event. |
534 | */ |
535 | |
536 | /*! |
537 | \fn Qt3DInput::QKeyboardHandler::backtabPressed(Qt3DInput::QKeyEvent *event) |
538 | |
539 | This signal is emitted when the backtab key is pressed with the event details being contained within \a event. |
540 | */ |
541 | |
542 | /*! |
543 | \fn Qt3DInput::QKeyboardHandler::asteriskPressed(Qt3DInput::QKeyEvent *event) |
544 | |
545 | This signal is emitted when the * key is pressed with the event details being contained within \a event. |
546 | */ |
547 | |
548 | /*! |
549 | \fn Qt3DInput::QKeyboardHandler::numberSignPressed(Qt3DInput::QKeyEvent *event) |
550 | |
551 | This signal is emitted when the number sign key is pressed with the event details being contained within \a event. |
552 | */ |
553 | |
554 | /*! |
555 | \fn Qt3DInput::QKeyboardHandler::escapePressed(Qt3DInput::QKeyEvent *event) |
556 | |
557 | This signal is emitted when the escape key is pressed with the event details being contained within \a event. |
558 | */ |
559 | |
560 | /*! |
561 | \fn Qt3DInput::QKeyboardHandler::returnPressed(Qt3DInput::QKeyEvent *event) |
562 | |
563 | This signal is emitted when the return key is pressed with the event details being contained within \a event. |
564 | */ |
565 | |
566 | /*! |
567 | \fn Qt3DInput::QKeyboardHandler::enterPressed(Qt3DInput::QKeyEvent *event) |
568 | |
569 | This signal is emitted when the enter key is pressed with the event details being contained within \a event. |
570 | |
571 | */ |
572 | |
573 | /*! |
574 | \fn Qt3DInput::QKeyboardHandler::deletePressed(Qt3DInput::QKeyEvent *event) |
575 | |
576 | This signal is emitted when the delete key is pressed with the event details being contained within \a event. |
577 | */ |
578 | |
579 | /*! |
580 | \fn Qt3DInput::QKeyboardHandler::spacePressed(Qt3DInput::QKeyEvent *event) |
581 | |
582 | This signal is emitted when the space key is pressed with the event details being contained within \a event. |
583 | */ |
584 | |
585 | /*! |
586 | \fn Qt3DInput::QKeyboardHandler::backPressed(Qt3DInput::QKeyEvent *event) |
587 | |
588 | This signal is emitted when the back key is pressed with the event details being contained within \a event. |
589 | */ |
590 | |
591 | /*! |
592 | \fn Qt3DInput::QKeyboardHandler::cancelPressed(Qt3DInput::QKeyEvent *event) |
593 | |
594 | This signal is emitted when the cancel key is pressed with the event details being contained within \a event. |
595 | */ |
596 | |
597 | /*! |
598 | \fn Qt3DInput::QKeyboardHandler::selectPressed(Qt3DInput::QKeyEvent *event) |
599 | |
600 | This signal is emitted when the select key is pressed with the event details being contained within \a event. |
601 | */ |
602 | |
603 | /*! |
604 | \fn Qt3DInput::QKeyboardHandler::yesPressed(Qt3DInput::QKeyEvent *event) |
605 | |
606 | This signal is emitted when the yes key is pressed with the event details being contained within \a event. |
607 | */ |
608 | |
609 | /*! |
610 | \fn Qt3DInput::QKeyboardHandler::noPressed(Qt3DInput::QKeyEvent *event) |
611 | |
612 | This signal is emitted when the yes key is pressed with the event details being contained within \a event. |
613 | */ |
614 | |
615 | /*! |
616 | \fn Qt3DInput::QKeyboardHandler::context1Pressed(Qt3DInput::QKeyEvent *event) |
617 | |
618 | This signal is emitted when the context 1 key is pressed with the event details being contained within \a event. |
619 | */ |
620 | |
621 | /*! |
622 | \fn Qt3DInput::QKeyboardHandler::context2Pressed(Qt3DInput::QKeyEvent *event) |
623 | |
624 | This signal is emitted when the context 2 key is pressed with the event details being contained within \a event. |
625 | */ |
626 | |
627 | /*! |
628 | \fn Qt3DInput::QKeyboardHandler::context3Pressed(Qt3DInput::QKeyEvent *event) |
629 | |
630 | This signal is emitted when the context 2 key is pressed with the event details being contained within \a event. |
631 | */ |
632 | |
633 | /*! |
634 | \fn Qt3DInput::QKeyboardHandler::context4Pressed(Qt3DInput::QKeyEvent *event) |
635 | |
636 | This signal is emitted when the context 4 key is pressed with the event details being contained within \a event. |
637 | */ |
638 | |
639 | /*! |
640 | \fn Qt3DInput::QKeyboardHandler::callPressed(Qt3DInput::QKeyEvent *event) |
641 | |
642 | This signal is emitted when the call key is pressed with the event details being contained within \a event. |
643 | */ |
644 | |
645 | /*! |
646 | \fn Qt3DInput::QKeyboardHandler::hangupPressed(Qt3DInput::QKeyEvent *event) |
647 | |
648 | This signal is emitted when the hangup key is pressed with the event details being contained within \a event. |
649 | */ |
650 | |
651 | /*! |
652 | \fn Qt3DInput::QKeyboardHandler::flipPressed(Qt3DInput::QKeyEvent *event) |
653 | |
654 | This signal is emitted when the flip key is pressed with the event details being contained within \a event. |
655 | */ |
656 | |
657 | /*! |
658 | \fn Qt3DInput::QKeyboardHandler::menuPressed(Qt3DInput::QKeyEvent *event) |
659 | |
660 | This signal is emitted when the menu key is pressed with the event details being contained within \a event. |
661 | */ |
662 | |
663 | /*! |
664 | \fn Qt3DInput::QKeyboardHandler::volumeUpPressed(Qt3DInput::QKeyEvent *event) |
665 | |
666 | This signal is emitted when the volume up key is pressed with the event details being contained within \a event. |
667 | */ |
668 | |
669 | /*! |
670 | \fn Qt3DInput::QKeyboardHandler::volumeDownPressed(Qt3DInput::QKeyEvent *event) |
671 | |
672 | This signal is emitted when the volume down key is pressed with the event details being contained within \a event. |
673 | */ |
674 | |
675 | /*! |
676 | \fn Qt3DInput::QKeyboardHandler::pressed(Qt3DInput::QKeyEvent *event) |
677 | |
678 | This signal is emitted when a key is pressed with the event details being contained within \a event. |
679 | */ |
680 | |
681 | /*! |
682 | \fn Qt3DInput::QKeyboardHandler::released(Qt3DInput::QKeyEvent *event) |
683 | |
684 | This signal is emitted when a key is released with the event details being contained within \a event. |
685 | */ |
686 | } // namespace Qt3DInput |
687 | |
688 | QT_END_NAMESPACE |
689 | |
690 | #include "moc_qkeyboardhandler.cpp" |
691 | |