Hi,
Thanks for the reply.
I found the examples folder, but couldn't work out if the joystick.py
file did anything.
Anyways, while I was reading it occured to me that maybe I had to do
joystick.event, rather than window.event.
That actually worked perfectly, but that wasn't clear from the
documentation (assuming I'm right). Should the documentation be updated?
Or is it blatently obvious and I just missed it?
The following code runs and works:
import pyglet
from accessible_output2.outputs.auto import Auto
ao2 = Auto()
window = pyglet.window.Window()
for j in pyglet.input.get_joysticks():
j.open()
@j.event
def on_joybutton_press(joystick, button):
ao2.speak('Button %s.' % button)
pyglet.app.run()
Cheers,
On 15/11/2015 06:13, Benjamin Moran wrote:
Hi Chris,
The way joysticks are implemented in pyglet, the event system handles updating
the button/axis values. For that reason you won't get any values if you tried
testing it in an interactive Python shell, for example.
First of all, could you try the joystick test app? It can be found in the
Bitbucket source, in the examples folder I think. It's named joystick.py.
If that doesn't work, could you give some additional details on your
environment? OS, pyglet version, Python version, etc.
-Ben
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.