fix keyboard
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 8 Jun 2006 15:53:17 +0000 (15:53 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 8 Jun 2006 15:53:17 +0000 (15:53 +0000)
lib/driver/rcconsole.cpp
lib/python/Screens/InputBox.py

index 0c70244a6e942639875fa409facae84a02fa684d..d3235758ef0deaa4a34b56a0e20082cc39bd1167 100644 (file)
@@ -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<eRCDevice*>::iterator i(listeners.begin()); i!=listeners.end(); ++i)
                        {
 //                             eDebug("ascii %08x", code);
-                               (*i)->handleCode(/*0x8000|*/code);
+                               (*i)->handleCode(code);
                        }
        }
 }
index f3f9775203250c8143f4547fc96dbd71e89e1ef7..9d54135c06bf67d2ff003ceb008399d3790b3e00 100644 (file)
@@ -15,7 +15,7 @@ class InputBox(Screen):
                self["text"] = Label(title)
                self["input"] = Input(**kwargs)
                                
-               self["actions"] = NumberActionMap(["WizardActions", "InputBoxActions", "AsciiActions"], 
+               self["actions"] = NumberActionMap(["WizardActions", "InputBoxActions", "InputAsciiActions"], 
                {
                        "gotAsciiCode": self.gotAsciiCode,
                        "ok": self.go,