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

add virtual axes usable with arrow keys #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomsik68
Copy link

axes X & Y were changed to tilt axes and X,Y are now for arrow keys

Signed-off-by: Tomas Jasek [email protected]

axes X & Y were changed to tilt axes and X,Y are now for arrow keys

Signed-off-by: Tomas Jasek <[email protected]>
@Oblomov
Copy link
Owner

Oblomov commented Jul 26, 2017

Thanks for the submission.

I like the idea, but I would prefer if it was made optional, since there's both a matter of personal preference and specific game usage that may influence the optimality of the choice.

The updates I just pushed (sorry again for doing it so late, BTW!) include a method to change the D-pad orientation. The tilt vs axis choice could probably be implemented in a similar fashion.

BTW, from my reading of your patch the D-Pad is still exposed as such by your patch, but its events are now duplicated with the axis events?

@tomsik68
Copy link
Author

Yes, I left the D-Pad exposed both as buttons and axes. The rationale is, that some games let you use both buttons and axes, some only let you use buttons, some only let you use axes.
I just like the flexibility :)

If you saw my fork, I was aiming to get it working with Atomic Bomberman, which doesn't let you remap joystick buttons, and as the game is not open-source, this little "driver-level" hack is necessary to get the desired controls :)

@Oblomov
Copy link
Owner

Oblomov commented Jul 27, 2017

I fully understand the need for custom behavior depending on game. I have actually been thinking about some way to allow more generic button mapping method (for example the A/B thing you have in your branches too). But precisely because it should be customizable I would prefer if it was done as an option. Do you think you can rework the patch in this sense?

@tomsik68
Copy link
Author

tomsik68 commented Jul 27, 2017

I believe configuration file would be beneficial for the button mapping. The file could look somewhat like this:

XWII_KEY_UP=BTN_DPAD_UP
XWII_KEY_DOWN=BTN_DPAD_DOWN
...

Of course, you could specify the file to use as a command line option(e.g. ./wiimote-pad -config landscape.conf), so you could have more of these - one for portrait, one for landscape etc.

Do you think it could be done like this?

@Oblomov
Copy link
Owner

Oblomov commented Jul 27, 2017

I've opened an issue to discuss the details about the configuration.

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