Skip to content
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

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

StelardActek
Copy link
Contributor

Changes to groups.py to enable devices such as racing pedals (which have multiple axes but no buttons) to be remapped in the GUI.

@sezanzeb
Copy link
Owner

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

@StelardActek
Copy link
Contributor Author

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.
A look at the output suggests one issue is just a formatting issue, easy enough to fix. Another seems to be failing because it is testing that ABS-only devices are excluded, which is what I'm intending to change here. If I can find that test I'll see about changing it. The last one... I'm not sure what that is about.

key_capa is None
and abs_capa is None
and rel_capa is None
and device_type != DeviceType.GAMEPAD
Copy link
Owner

@sezanzeb sezanzeb Sep 23, 2024

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.

@sezanzeb
Copy link
Owner

For the linter, you can get it to be formatted correctly quickly by doing

sudo apt install black
black input-remapper/inputremapper

(see https://github.com/psf/black)

There is luckily no need to do it by hand

@jonasBoss
Copy link
Collaborator

From my side the change looks good!

@sezanzeb
Copy link
Owner

sezanzeb commented Sep 28, 2024

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.

@sezanzeb sezanzeb merged commit 7586ad9 into sezanzeb:main Oct 1, 2024
4 checks passed
@sezanzeb
Copy link
Owner

sezanzeb commented Oct 1, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants