• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Good way to add new keybinds?

tehAon

Refugee
I'm relatively new to the game (only a few weeks) and I wanted to try to dabble in the modding world here a little bit. I come from Space Engineers and I was looking to bring over some of the utilities from there to here. I wanted to create some new functionality in the game but I didn't really want to add new physical buttons to the game (at least not yet) so I wanted to add a few new key binds to call action to the C# code I'm writing.

The best place I've found thus far is PlayerMoveController and under the Update method. I'm looking to add a Prefix using Harmony to check if the key is pressed and and then skip the normal code if that's the case. But from what I've noticed so far that when I try to bind to say ctrl + middle mouse click it will call the action twice. Is there a better place to add new key binds?

I appreciate any input or advice.

 
Back
Top