-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not exclude buttonless devices that have axes #956
Conversation
Thanks a bunch. Can you please check the failed test? Let me know if you need help running them locally, the test setup is somewhat dreadful, and pycharm does not like it. See https://github.com/sezanzeb/input-remapper/blob/main/readme/development.md#automated-tests |
Hey @sezanzeb, I'll do my best but I'm not actually a python dev so I'm not really familiar with how these things are done. |
inputremapper/groups.py
Outdated
key_capa is None | ||
and abs_capa is None | ||
and rel_capa is None | ||
and device_type != DeviceType.GAMEPAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line (device_type != DeviceType.GAMEPAD
) is obsolete with your change. All gamepads have certain ev_key and ev_abs events, therefore, testing for abs_capa and key_capa is probably sufficient.
For the linter, you can get it to be formatted correctly quickly by doing
(see https://github.com/psf/black) There is luckily no need to do it by hand |
From my side the change looks good! |
I'll give it a try maybe tomorrow or something (just a quick test if gamepads still work and such, I don't have a foot pedal), and then merge it if there is no further objection. And I need to run the integration tests locally. |
Thank you! |
Changes to groups.py to enable devices such as racing pedals (which have multiple axes but no buttons) to be remapped in the GUI.