cyber-sushi / makima

Linux daemon to remap and create macros for keyboards, mice and controllers
GNU General Public License v3.0
138 stars 1 forks source link

Bad(?) example config for xbox controllers #5

Closed maxlittlemore closed 6 months ago

maxlittlemore commented 6 months ago

Hello,

First up, thanks for this, such a cool project.

Unfortunately I can't get it to work for me.

I'm using a 3rd party xbox one controller (reports as Generic X-Box pad) on a rasperry pi 400. I built the makima executable from a 0.4.0 release source download.

The config for the controller seems to load fine (no parsing/error messages, sends appropriate events for most things) but as soon I touch the left joy, the mouse pointer moves to the top-left corner as if I am holding the joystick to the top left even when it's centred.

I can't find a suitable setting in the config to adjust axies and evtest reports centred as a 0 (zero)

Unfortunately my toml-fu is non existent (seems simple enough to read) and my rust is only rusty because it's at iron ore stage, never even smelted, otherwise I'd probs just be giving you a patch.

Any ideas where to look to start fixing this? I love this concept as a way of running this machine as my TV based media guardian...

cyber-sushi commented 6 months ago

Hello,

you're absolutely right! The Xbox example config file still uses the old XBOX_CONTROLLER parameter which has been replaced by SIGNED_AXIS_VALUE since it also applies to Switch Joycons. I'll fix it once I get home, but in the meantime, can you replace it locally in your config file and tell me if it works?

Thank you in advance

Edit: I've updated the file on the repo, you can use that

maxlittlemore commented 6 months ago

Thanks so much for that. Just got to this now and setting SIGNED_AXIS_VALUE to true worked treat.

Just one other thing, is it possible to map one of the joysticks to the scroll wheel?

when I try

REL_RY = ["REL_WHEEL"]

it crashes complaining that: "expected a string with any of the constants in Key"

Just a nice to have really...

cyber-sushi commented 6 months ago

It's currently not possible as it would require some additional code to convert the stick's events into scroll wheel events, but I can add it similarly to how cursor movement works

Now that I think about it, it could definitely be handy to have both vertical and horizontal scrolling capabilities on the controller, so I'll definitely do that soon

maxlittlemore commented 6 months ago

2D scroll would definitely would be handy on my TV screen (still running an old 1080i). Nice way of getting around and depending on the app+(shift || ctl) it gives zoom as well.

I'll keep myself updated on your updates.

I might even have a go at making a GUI to build configs, if I get a usable prototype for xbox (the only usb controller I own) I'll let you know and defs share it with you, see what you think.

(** sorry this is one thread under one issue, maybe I should split it? #1 is already done and works fine for me...)

cyber-sushi commented 6 months ago

On issue #2 there is a request for a GUI to build config files, and I agree that it'd be a good idea. Also, limiting the scope to controllers would probably be for the best, otherwise it might get really complicated. If you get a working prototype, I'd be glad to see it!

Anyway, yes, I think we should split the issues, we can use issue #2 to discuss the config GUI, so I'm closing this one. If you want, feel free to open another issue regarding scrolling, I'll keep you updated under that one (I'll probably start working on it in the next few days)

And thank you for your cooperation!

cyber-sushi commented 5 months ago

Hello, just wanted to mention that I have implemented 2D scrolling in v0.4.2! I have also updated the examples config files to reflect those changes with a few new settings, so check them out