|
@@ -16,7 +16,13 @@ class Keyboard(threading.Thread):
|
|
|
self.running=True
|
|
self.running=True
|
|
|
self.handleInput()
|
|
self.handleInput()
|
|
|
def handleInput(self):
|
|
def handleInput(self):
|
|
|
- dev = InputDevice("/dev/input/by-id/usb-Microsoft_Comfort_Curve_Keyboard_3000-event-kbd")
|
|
|
|
|
|
|
+ device="/dev/input/by-id/usb-Microsoft_Comfort_Curve_Keyboard_3000-event-kbd"
|
|
|
|
|
+ try:
|
|
|
|
|
+ dev = InputDevice(device)
|
|
|
|
|
+ except Exception as e:
|
|
|
|
|
+ print("Error accessing input device %s" % device)
|
|
|
|
|
+ self.running=False
|
|
|
|
|
+ return
|
|
|
#dev = InputDevice("/dev/input/by-path/platform-i8042-serio-0-event-kbd")
|
|
#dev = InputDevice("/dev/input/by-path/platform-i8042-serio-0-event-kbd")
|
|
|
VALID_KEYS = [ "KEY_PAGEUP", "KEY_PAGEDOWN", "KEY_F5" ]
|
|
VALID_KEYS = [ "KEY_PAGEUP", "KEY_PAGEDOWN", "KEY_F5" ]
|
|
|
while True:
|
|
while True:
|