Lire un gamepad

Top Page

Reply to this message
Author: Frédéric
Date:  
To: Guilde
Subject: Lire un gamepad
Hello,

J'ai un gamepad Thrustmaster, qui, lorsque je le branche, retourne ces
infos dans dmesg :

[1640271.396036] usb 7-2: new low-speed USB device number 4 using
                 uhci_hcd
[1640271.575057] usb 7-2: New USB device found, idVendor=044f,
                 idProduct=b315
[1640271.575063] usb 7-2: New USB device strings: Mfr=1, Product=2,
                 SerialNumber=0
[1640271.575066] usb 7-2: Product: Thrustmaster dual analog 3.2
[1640271.575068] usb 7-2: Manufacturer: Mega World
[1640271.602147] input: Mega World Thrustmaster dual analog 3.2
                 as /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:044F:B315.0014/input/input33
[1640271.602313] hid-generic 0003:044F:B315.0014: input,hidraw3: USB
                 HID v1.10 Gamepad [Mega World Thrustmaster dual analog
                 3.2] on usb-0000:00:1d.1-2/input0


J'aimerais pouvoir récupérer les infos depuis un script python.

Komenkonfé ? J'ai utilisé jstest pour voir/calibrer les boutons, mais
après ? Y a-t-il un moyen simple de retrouver ces infos en lisant un
pseudo-device, ou un /proc particulier ?

Merci pour toute piste.

-- 
    Frédéric