mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 14:15:41 +00:00
Fix gpio input
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user