KeybindLib
A library that lets you add your own keybinds to the controls.
About this mod Author’s original text
KeybindLib
- A library that lets you add your own keybinds.
Adding your own keybinds
Keybinds.Bind(string name, string binding) => Keybind
Keybinds.Bind(string category, string name, string binding) => Keybind
Keybinds.Toggle(Keybind.Toggle toggle) => Keybind
Keybinds.Toggle(string category, Keybind.Toggle toggle) => Keybind
Keybinds.Toggle(Keybind keybind, Keybind.Toggle toggle) => Keybind
To register a keybind:
Keybinds.Bind("Push", "/b");
To register a keybind with a category:
Keybinds.Bind("General", "Push", "/b");
To register a toggle:
Keybinds.Toggle(new Keybind.Toggle()) // This is a toggle that will be under your modGuid header.
To register a toggle with a category:
Keybinds.Toggle("General", new Keybind.Toggle()) // This is a toggle that will be under your specified category.
If you want to have a toggle for your keybind:
Keybind keybind = Keybinds.Bind("Push", "/b");
Keybinds.Toggle(keybind, new Keybind.Toggle()
{
defaultValue = false,
falseText = "off",
trueText = "on"
}); // Returns the same keybind and applies the new toggle from this method.
If you want to use the keybind:
SemiFunc.InputDown(keybind.inputKey);
SemiFunc.InputUp(keybind.inputKey);
SemiFunc.InputHold(keybind.inputKey);
InputManager.instance.InputToggleGet(keybind.inputKey); // Only use this when you have set a toggle to your keybind otherwise this will error.
There are much more variables in the "Keybind" class. Check the class in dnSpy for more details.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.