From b35f481ef0ccd35ecfa9bcd610ad1e923e86a391 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 8 Jun 2006 15:53:17 +0000 Subject: fix keyboard --- lib/driver/rcconsole.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/driver') diff --git a/lib/driver/rcconsole.cpp b/lib/driver/rcconsole.cpp index 0c70244a..d3235758 100644 --- a/lib/driver/rcconsole.cpp +++ b/lib/driver/rcconsole.cpp @@ -38,16 +38,19 @@ eRCConsoleDriver::~eRCConsoleDriver() void eRCConsoleDriver::keyPressed(int) { - char data[16]; - char *d = data; + unsigned char data[16]; + unsigned char *d = data; int num = read(handle, data, 16); int code=-1; int km = input->getKeyboardMode(); + if (km == eRCInput::kmNone) + return; + while (num--) { -// eDebug("console code %02x\n", *d++); +// eDebug("console code %08x\n", *d); if (km == eRCInput::kmAll) code = *d++; else @@ -75,7 +78,7 @@ void eRCConsoleDriver::keyPressed(int) for (std::list::iterator i(listeners.begin()); i!=listeners.end(); ++i) { // eDebug("ascii %08x", code); - (*i)->handleCode(/*0x8000|*/code); + (*i)->handleCode(code); } } } -- cgit v1.2.3