-
Notifications
You must be signed in to change notification settings - Fork 334
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
Joystick support! #23
base: master
Are you sure you want to change the base?
Conversation
…eviously static functions are not anymore. KEY_LEFT, KEY_RIGHT etc were changed due to a conflict with the newly included linux/joystick.h. Updated the README file with information on how to bind actions to joysticks.
I was a little worried that this might conflict with #10, but I wanted to add joystick support because my pi only has joysticks hooked up to it usually (it's pretty much an emulator box). If #10 gets implemented and it's better to not accept this request or I need to make some changes, that's fine. This isn't a very groundbreaking or vital feature, so if it doesn't get merged right away it's not really a problem. |
Would this work with a games console style controller? I have a USB one I plan to use for playing games. It would be nice to be able to control omxplayer with it. |
@popcornmix @mdraves91 is this PR going to be implemented? |
I don't believe this should be implemented inside omxplayer. |
@mdraves91 can you close this PR, as it is not going to be implemeted |
@mdraves91 please close this PR, as it is not going to be implemeted |
@popcornmix is this going to be merged? Else reject it... |
Hey all, I've added joystick support. You can now bind actions in a keyconfig file to one or more joysticks! All of the changes are explained in the commit comment and the changes to the readme, but I thought I'd highlight the most important one (binding joysticks in a key config) here.
The short version of it is to bind a joystick axis you use the following syntax:
and the following for a button:
[number] is just the number of the axis or button (watch out, they can overlap! There can exist an axis 0 and a button 0), and [+-] indicates the direction of movement of the axis that should trigger the event. If a direction is missing, it won't work.
I've tested it a bit and it all looks okay, but I'd appreciate it if anyone else with a joystick handy could test it out too. Some cases that I've tested that work properly:
If you have any questions feel free to ask, or if you have any more edge cases you want me to try out let me know that too!