Compare commits
7 Commits
cf4e856a2b
...
e155a6cfcc
Author | SHA1 | Date | |
---|---|---|---|
e155a6cfcc | |||
8965efd557 | |||
|
746fc0d499 | ||
cd5fdba714 | |||
|
b23943510e | ||
ba3f9078e3 | |||
|
1e1caf3469 |
|
@ -139,7 +139,7 @@ def ask_user_for_keymap(dev):
|
||||||
('orange', 'guitar button'),
|
('orange', 'guitar button'),
|
||||||
]
|
]
|
||||||
|
|
||||||
print("Press the corresponding button on your controller. If the button doesn't exist, press the start button again to ignore it.")
|
print("Press the corresponding button on your controller. If the button doesn't exist, or doesn't register, press the start button again to ignore it. It might act as an axis, we will register that later.")
|
||||||
# Dictionary of XBox buttons to xboxdrv key names.
|
# Dictionary of XBox buttons to xboxdrv key names.
|
||||||
mappings = {}
|
mappings = {}
|
||||||
# Values of mappings dictionary to avoid mapping the same button twice.
|
# Values of mappings dictionary to avoid mapping the same button twice.
|
||||||
|
@ -184,6 +184,8 @@ def ask_user_for_axismap(dev, mappings):
|
||||||
('y2', ('down', 'up'), 'right anlog stick (up/down)'),
|
('y2', ('down', 'up'), 'right anlog stick (up/down)'),
|
||||||
('lt', ('trigger',), 'left analog trigger (L or L2 button)'),
|
('lt', ('trigger',), 'left analog trigger (L or L2 button)'),
|
||||||
('rt', ('trigger',), 'right analog trigger (R or R2 button)'),
|
('rt', ('trigger',), 'right analog trigger (R or R2 button)'),
|
||||||
|
('dpad_x', ('left', 'right'), 'dpad (left/right)'),
|
||||||
|
('dpad_y', ('up', 'down'), 'dpad (up/down)'),
|
||||||
]
|
]
|
||||||
|
|
||||||
print("Move the corresponding axis on your controller. If the axis doesn't exist, press the start button to ignore it.")
|
print("Move the corresponding axis on your controller. If the axis doesn't exist, press the start button to ignore it.")
|
||||||
|
|
|
@ -29,7 +29,7 @@ def list_active_evdev():
|
||||||
for fd in r:
|
for fd in r:
|
||||||
for event in list(devices[fd].read())[:1]:
|
for event in list(devices[fd].read())[:1]:
|
||||||
if event.type == evdev.ecodes.EV_KEY:
|
if event.type == evdev.ecodes.EV_KEY:
|
||||||
output.append(devices[fd].fn)
|
output.append(devices[fd].path)
|
||||||
anyInput = True
|
anyInput = True
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
Loading…
Reference in New Issue
Block a user