MissionControl icon indicating copy to clipboard operation
MissionControl copied to clipboard

Possible to bind rebind keys buttons?

Open Zacharybinx34 opened this issue 5 years ago • 5 comments

For instance, I would like to bind one key to X + Y.

Thanks!!

Zacharybinx34 avatar Dec 05 '20 23:12 Zacharybinx34

For simple button rebinding you can use the built-in button mapping features of HOS 10.0.0+

Arbitrary button combos on the other hand, while possible, introduce a bunch of additional complexity that I'm not sure I want to deal with at the moment. Maybe at some point in the future I can make this possible.

ndeadly avatar Dec 06 '20 02:12 ndeadly

The main reason it would be nice is so you can bind short hop to just one button in Super Smash Bros. ATM, you have to press both X + Y at the same time, which is annoying.

Zacharybinx34 avatar Dec 06 '20 04:12 Zacharybinx34

Sorry I misinterpreted what you were saying. I don't play smash so didn't realise that was an existing combo.

These sort of things are certainly possible to do, but they bring their own set of challenges and performance overhead. It might be reasonable to do in the future but currently this kind of thing would cause too many problems. Especially when you start to get into game-specific modifiers. Your best bet for now would be to fork the project and make your own modifications.

ndeadly avatar Dec 06 '20 10:12 ndeadly

Problem there is I don't know how to do any of that :)

Zacharybinx34 avatar Dec 28 '20 00:12 Zacharybinx34

Never too late to learn ;) If you're interested enough I'm open to answering questions.

The actual thing you want to do isn't that difficult itself, I have code for handling button combos here https://github.com/ndeadly/MissionControl/blob/a916172c07bf31e3af693f860e394af838aa0096/bluetooth-mitm/source/controllers/emulated_switch_controller.cpp#L43 You could make it work by adding something like this to that function

if (buttons->x) {
    buttons->y = 1;
}

This would send the X + Y combo when you hit only X. The real issue would be how to deal with selectively applying it only to smash. This is the part that makes it complicated for me to include support for in the main codebase.

ndeadly avatar Dec 28 '20 12:12 ndeadly