GNOME Joystick control
by Manuel Amador (Rudd-O)
rudd-o@amautacorp.com
Joystick control is a simple tool that lets you control popular media applications using your joystick. All you need to tell it is which joystick device you want to use, and that's all!
Optionally, you can specify priorities for your applications, so when one is not running, Joystick control automatically directs joystick commands to the running application highest on the list.
Once this application is running, it will sit in your notification area
and be quiet. To take advantage of it:
- The joystick/gamepad left/right controls advance to the next song or
rewind to the previous song. If you're watching TV, they change
channels up or down
- Button one of your joystick/gamepad toggles play/pause
- Button two stops your media player
PREREQUISITES
This software requires:
- a joystick or gamepad, properly configured for use
- Linux
- Python
- the Python GTK+ 2, GNOME and Glade bindings
- a supported media application to control
INSTALLATION
Please read the INSTALL file.
FEEDBACK: REPORTING BUGS, ETC.
Direct any questions to Manuel Amador (Rudd-O). Don't forget to visit the project's Web site first:
http://www.amautacorp.com/staff/Rudd-O/projects/gjc-front/
to read news about this project.
LICENSE AND LEGAL NOTICE
This software is under the GPL. See the file COPYING for licensing information. Contact me if you need us to license this software under a different license.
REUSING JOYSTICK CONTROL
This is the first known application that uses the joystick in Python. Well, that's not true. What's true is this:
- the app reads joystick events
- the app collapses multiple equal events into one (for broken gamepads like mine)
- the app considers a threshold
- the code is easily excisable
- the code for joystick processing is completely multithreaded, and will deliver events to any function or method of your choosing. Keep in mind the method of your choosing will be executed in thread context, so if you're using GTK+, you better use g_idle_add to execute more stuff in your app context! See the on_joystick_event and on_joystick_event_synchronized callbacks in the JoystickControl class.
Feel free to reuse this code while abiding the GPL
