initial joystick support for python keygrabber (shinydoofy i need your help to test this i dont have a joystick around)
This commit is contained in:
parent
c063fdaf99
commit
e2a63b1107
|
@ -21,9 +21,12 @@ class KeyGrabber:
|
|||
pygame.display.quit()
|
||||
return event.key
|
||||
# TODO: Make work with joystick. Do buttons first.
|
||||
#if event.type == JOYBUTTONDOWN:
|
||||
# pygame.display.quit()
|
||||
# return event.joy, event.button
|
||||
if event.type == JOYBUTTONDOWN:
|
||||
pygame.display.quit()
|
||||
# TODO: Make sure we're returning the data we need
|
||||
# for config file here. I'm not sure if this is
|
||||
# the correct data.
|
||||
return event.joy, event.button
|
||||
|
||||
if __name__ == "__main__":
|
||||
kg = KeyGrabber()
|
||||
|
|
Loading…
Reference in New Issue