-
Notifications
You must be signed in to change notification settings - Fork 2
/
controller_test.py
31 lines (29 loc) · 1011 Bytes
/
controller_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# for testing the controller lib
# Enter a game and run this program.
# The virtual controller should start entering inputs into the game.
# ControlC to exit the program.
import pyxinput
import time
controller = pyxinput.vController()
while True:
controller.set_value("AxisLy",1)
controller.set_value("AxisLx",1)
controller.set_value("AxisRy",1)
controller.set_value("AxisRx",1)
controller.set_value("TriggerL",1)
controller.set_value("TriggerR",1)
controller.set_value("BtnA",1)
controller.set_value("BtnX",1)
controller.set_value("BtnStart",1)
controller.set_value("BtnB",1)
time.sleep(0.5)
controller.set_value("AxisLy",0)
controller.set_value("AxisLx",0)
controller.set_value("AxisRy",0)
controller.set_value("AxisRx",0)
controller.set_value("TriggerL",0)
controller.set_value("TriggerR",0)
controller.set_value("BtnA",0)
controller.set_value("BtnX",0)
controller.set_value("BtnStart",0)
controller.set_value("BtnB",0)