Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use the Logitech F710 gamepad as an input device to a python program. I am using Ubuntu. I do not really know where to start, so here are a few questions:

  1. How does Ubuntu detect the gamepad?
  2. If the gamepad is recognized within Ubuntu, how would I interact with this device via a python script?
  3. If this is not easy to do in Ubuntu, how would I interact with the gamepad via a python script in Windows?
share|improve this question
up vote 1 down vote accepted
  1. As a USB HID device.

  2. Via the event subsystem.

  3. Uh...

share|improve this answer
Thank you. With regards to recognizing a USB HID device, do I need to install drivers for the gamepad? – wherestheforce Jul 4 '12 at 15:45
No. All modern Linuxes have the USB HID driver already available, either built-in or as a module. – Ignacio Vazquez-Abrams Jul 4 '12 at 15:47

Input devices register as /dev/input/eventX in Linux, to interact with them you have to open that pseudo file and read from it.

Example source code to do in from C can be downloaded via:

apt-get source evtest

Python Code can be found at:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.