fix for unused buttons on bottom row
authorFelix Domke <felix.domke@multimedia-labs.de>
Sun, 23 Aug 2009 22:30:31 +0000 (00:30 +0200)
committerFelix Domke <felix.domke@multimedia-labs.de>
Sun, 23 Aug 2009 22:30:31 +0000 (00:30 +0200)
lib/python/Screens/VirtualKeyBoard.py

index bde6f75db712bb65163f889357fdf7c0b464900d..19500ed7ef79668d9a067ac919ffd929ca5ab49e 100755 (executable)
@@ -195,13 +195,19 @@ class VirtualKeyBoard(Screen):
                
                selectedKey = self.selectedKey
 
+               text = None
+
                for x in list:
                        if selectedKey < 12:
-                               text = x[selectedKey]
+                               if selectedKey < len(x):
+                                       text = x[selectedKey]
                                break
                        else:
                                selectedKey -= 12
 
+               if text is None:
+                       return
+
                text = text.encode("utf-8")
 
                if text == "EXIT":