aboutsummaryrefslogtreecommitdiff
path: root/inputs
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-01-28 15:19:21 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-01-28 15:19:21 -0500
commitef1abfa913498e02a4ece3be4be45d2f03e47d05 (patch)
treeca9e7fb9819e59872f7f6a73c032b40a0804517c /inputs
parenta7d6577e55ebd665ad9e4f45183836f11b3c6fd4 (diff)
Lots of stuff INCOMPLETE
Diffstat (limited to 'inputs')
-rw-r--r--inputs/OSCInput.py4
-rw-r--r--inputs/PygameInput.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/inputs/OSCInput.py b/inputs/OSCInput.py
index f867fb5..ba1e035 100644
--- a/inputs/OSCInput.py
+++ b/inputs/OSCInput.py
@@ -7,8 +7,8 @@ class OSCInput(Input):
def inputInit(self):
HOST = '' # Symbolic name meaning all available interfaces
PORT = self['Port'] # Arbitrary non-privileged port
- self.server = liblo.Server(PORT)
- self.server.add_method(None,None, self.fallback)
+ self.server = liblo.Server(PORT)
+ self.server.add_method(None,None, self.fallback)
# except liblo.ServerError, err:
# main_log.error(str(err))
diff --git a/inputs/PygameInput.py b/inputs/PygameInput.py
index 18f463d..414adf3 100644
--- a/inputs/PygameInput.py
+++ b/inputs/PygameInput.py
@@ -23,7 +23,10 @@ class PygameInput(Input):
if event.key == 27:
self.die()
if self['Keyboard']:
- self.respond({'Key': event.key, 'KeyChar': chr(event.key)})
+ try:
+ self.respond({'Key': event.key, 'KeyChar': chr(event.key)})
+ except:
+ self.respond({'Key': event.key})
return
else:
pygame.event.post(event)