1 | #if defined(USE_LIRC) || defined(USING_APPLEREMOTE) |
---|
2 | else if (ce->type() == |
---|
3 | (QEvent::Type) LircKeycodeEvent::kLIRCKeycodeEventType && |
---|
4 | !d->ignore_lirc_keys) |
---|
5 | { |
---|
6 | LircKeycodeEvent *lke = static_cast<LircKeycodeEvent *>(ce); |
---|
7 | VERBOSE(VB_IMPORTANT, |
---|
8 | QString("MythMainWindow, got lirc key, text %1: ") |
---|
9 | .arg( lke->text() )); |
---|
10 | |
---|
11 | |
---|
12 | if (LircKeycodeEvent::kLIRCInvalidKeyCombo == lke->modifiers()) |
---|
13 | { |
---|
14 | VERBOSE(VB_IMPORTANT, QString("MythMainWindow, Warning: ") + |
---|
15 | QString("Attempt to convert LIRC key sequence '%1' " |
---|
16 | "to a Qt key sequence failed.") |
---|
17 | .arg(lke->lirctext())); |
---|
18 | } |
---|
19 | else |
---|
20 | { |
---|
21 | GetMythUI()->ResetScreensaver(); |
---|
22 | if (GetMythUI()->GetScreenIsAsleep()) |
---|
23 | return; |
---|
24 | |
---|
25 | QKeyEvent key(lke->keytype(), lke->key(), |
---|
26 | lke->modifiers(), lke->text()); |
---|
27 | |
---|
28 | VERBOSE(VB_IMPORTANT, |
---|
29 | QString( "Sending QKeyEvent %1 ").arg( key.text() )); |
---|
30 | |
---|
31 | QObject *key_target = getTarget(key); |
---|
32 | if (!key_target) |
---|
33 | QApplication::sendEvent(this, &key); |
---|
34 | else |
---|
35 | QApplication::sendEvent(key_target, &key); |
---|
36 | } |
---|
37 | } |
---|
38 | else if (ce->type() == (QEvent::Type) LircMuteEvent::LircMuteEventType) |
---|
39 | { |
---|
40 | LircMuteEvent *lme = static_cast<LircMuteEvent *>(ce); |
---|
41 | d->ignore_lirc_keys = lme->eventsMuted(); |
---|
42 | } |
---|
43 | #endif |
---|
44 | |
---|