X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/54bd4123728628a6f77bad2584b70d1353a91666..a635670ac3999bda4692c04cc05fb92176601673:/lib/driver/rcconsole.cpp diff --git a/lib/driver/rcconsole.cpp b/lib/driver/rcconsole.cpp index f662b2b1..eaeeb586 100644 --- a/lib/driver/rcconsole.cpp +++ b/lib/driver/rcconsole.cpp @@ -42,30 +42,27 @@ void eRCConsoleDriver::keyPressed(int) char *d = data; int num = read(handle, data, 16); int code; -#if 0 + int km = input->getKeyboardMode(); - if (km == eRCInput::kmNone) - return; -#endif while (num--) { -#if 0 if (km == eRCInput::kmAll) -#endif code = *d++; -#if 0 else { if (*d == 27) // escape code { - while (num) + /* skip all this stuff */ + return; + +/* while (num) { num--; if (*++d != '[') break; } - code = -1; + code = -1; */ } else code = *d; ++d; @@ -75,10 +72,13 @@ void eRCConsoleDriver::keyPressed(int) if (code == 0x7F) /* delete */ code = -1; } -#endif + if (code != -1) for (std::list::iterator i(listeners.begin()); i!=listeners.end(); ++i) - (*i)->handleCode(code); + { + eDebug("ascii %08x", code); + (*i)->handleCode(code | 0x8000); + } } } @@ -104,7 +104,7 @@ const char *eRCConsole::getKeyDescription(const eRCKey &key) const int eRCConsole::getKeyCompatibleCode(const eRCKey &key) const { - return key.code; // | KEY_ASCII; + return key.code; } class eRCConsoleInit @@ -112,7 +112,7 @@ class eRCConsoleInit eRCConsoleDriver driver; eRCConsole device; public: - eRCConsoleInit(): driver("/dev/vc/0"), device(&driver) + eRCConsoleInit(): driver("/dev/stdin"), device(&driver) { } };