Fix gpio input

This commit is contained in:
9and3r
2015-05-24 23:37:24 +02:00
parent c5804d5c51
commit c41ac0bf68

View File

@@ -48,6 +48,7 @@ def right(channel):
type = pygame.KEYDOWN
dict['key'] = pygame.K_RIGHT
event = pygame.event.Event(type, dict)
event.unicode = None
pygame.event.post(event)
@@ -59,6 +60,7 @@ def left(channel):
type = pygame.KEYDOWN
dict['key'] = pygame.K_RIGHT
event = pygame.event.Event(type, dict)
event.unicode = None
pygame.event.post(event)
@@ -70,6 +72,7 @@ def down(channel):
type = pygame.KEYDOWN
dict['key'] = pygame.K_DOWN
event = pygame.event.Event(type, dict)
event.unicode = None
pygame.event.post(event)
@@ -81,6 +84,7 @@ def up(channel):
type = pygame.KEYDOWN
dict['key'] = pygame.K_UP
event = pygame.event.Event(type, dict)
event.unicode = None
pygame.event.post(event)
@@ -92,4 +96,5 @@ def enter(channel):
type = pygame.KEYDOWN
dict['key'] = pygame.K_RETURN
event = pygame.event.Event(type, dict)
event.unicode = None
pygame.event.post(event)