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

Rel inputs (rel2rel, rel2btns, rels2axes), and joystick calibration #101

Open
wants to merge 12 commits into
base: devel
Choose a base branch
from

Conversation

yyon
Copy link

@yyon yyon commented Jul 27, 2021

Hello!
I was trying out your project and found it was missing some functionality I wanted, so I tried implementing it.

I use a controller similar to the Azeron controller, which is designed to be used with a mouse, so I wanted to be able to remap the mouse, but MoltenGamepad was missing rel inputs, which prevented me from using the mouse movement. I added in the ability to use rel inputs, and added the following translators which use it:

  • rel2rel: maps a rel event to a rel event. I needed it so I could block the mouse inputs while still using the mouse movement (needed for some games).
  • rel2btns: maps a rel event to two buttons: one button is pressed if the input is moved positive, the other if it is moved negative. Used so I can remap the mouse wheel up/down to two buttons.
  • rel2axes: maps two rels to a joystick. Used so I can control the camera with a mouse on games which don't support mixed mouse+keyboard and gamepad inputs, when I want to send gamepad inputs instead of mouse+keyboard.

There are two other small changes that I added. One is the ability to calibrate an uncalibrated joystick with some additional optional arguments for axis2axis. The other is adding the scroll wheel events to the virtual mouse output.

I don't imagine that using an Azeron-like gamepad with a mouse is that popular of a use case, but hopefully it's popular enough to warrant the inclusion of this pull request. I don't often send pull requests, so let me know if I did anything wrong, or if you need anything more (more documentation, code changes, etc.).

@Arctic-Circle-System
Copy link

I'm pretty sure at this point, you'd be better off forking the project. The dev hasn't been active on GitHub for years. For all I know, they might be dead.

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.

2 participants