aboutsummaryrefslogtreecommitdiff
path: root/lib/driver
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-12-22 15:33:20 +0100
committerghost <andreas.monzner@multimedia-labs.de>2009-12-22 15:33:20 +0100
commite8eb8e9694379204f4b9143ca6b33db48809df7f (patch)
tree05034256bd0b58319eb2390647a2469c83390d1d /lib/driver
parentf13490a1a66421b08cef893cb89e8f78c5873d05 (diff)
downloadenigma2-e8eb8e9694379204f4b9143ca6b33db48809df7f.tar.gz
enigma2-e8eb8e9694379204f4b9143ca6b33db48809df7f.zip
lib/driver/rc*: open remote control input devices in exclussive mode... so the keycodes are not supplied to the linux console
Diffstat (limited to 'lib/driver')
-rw-r--r--lib/driver/rc.cpp10
-rw-r--r--lib/driver/rc.h1
-rw-r--r--lib/driver/rcinput.cpp1
3 files changed, 12 insertions, 0 deletions
diff --git a/lib/driver/rc.cpp b/lib/driver/rc.cpp
index c7acd113..8dab0201 100644
--- a/lib/driver/rc.cpp
+++ b/lib/driver/rc.cpp
@@ -127,6 +127,16 @@ std::string eRCInputEventDriver::getDeviceName()
return name;
}
+void eRCInputEventDriver::setExclusive(bool b)
+{
+ if (handle >= 0)
+ {
+ int grab = b;
+ if (::ioctl(handle, EVIOCGRAB, &grab) < 0)
+ perror("EVIOCGRAB");
+ }
+}
+
eRCInputEventDriver::~eRCInputEventDriver()
{
if (handle>=0)
diff --git a/lib/driver/rc.h b/lib/driver/rc.h
index 9708ea7b..ef0588c4 100644
--- a/lib/driver/rc.h
+++ b/lib/driver/rc.h
@@ -112,6 +112,7 @@ public:
std::string getDeviceName();
eRCInputEventDriver(const char *filename);
~eRCInputEventDriver();
+ void setExclusive(bool b); // in exclusive mode data is not carried to console device
};
class eRCKey
diff --git a/lib/driver/rcinput.cpp b/lib/driver/rcinput.cpp
index d10d94f3..0aada8df 100644
--- a/lib/driver/rcinput.cpp
+++ b/lib/driver/rcinput.cpp
@@ -83,6 +83,7 @@ eRCDeviceInputDev::eRCDeviceInputDev(eRCInputEventDriver *driver)
break;
}
}
+ driver->setExclusive(!iskeyboard);
eDebug("Input device \"%s\" is %sa keyboard.", id.c_str(), iskeyboard ? "" : "not ");
}