You are viewing a potentially older version of this package. View all versions.
BULLETBOT-KeybindLib-1.0.0 icon

KeybindLib

A library that lets you add your own keybinds to the controls.

Date uploaded 2 days ago
Version 1.0.0
Download link BULLETBOT-KeybindLib-1.0.0.zip
Downloads 32383
Dependency string BULLETBOT-KeybindLib-1.0.0

README

KeybindLib

  • A library that lets you add your own keybinds.

Adding your own keybinds

Keybinds.Register(string name, string binding) => KeybindData

To register a keybind:

Keybinds.Register("Push", "<Keyboard>/b");

If you want to have toggle states:

KeybindData keybindData = Keybinds.Register("Push", "<Keyboard>/b");
if (keybindData != null)
{
    keybindData.toggleData = new KeybindToggleData() 
    { 
        defaultValue = true,
        falseText = "Off",
        trueText = "On"
    };
}

If you want to use the keybind:

SemiFunc.InputDown(keybindData.inputKey);
SemiFunc.InputUp(keybindData.inputKey);
SemiFunc.InputHold(keybindData.inputKey);
SemiFunc.InputToggleGet(keybindData.inputKey); // Only use this when you actually set the "toggleData" variable otherwise it will error.

There are much more variables in the "KeybindData" class. Check the class in dnSpy for more details.

CHANGELOG

Note

If that version is not listed here, do not download that version, as it can cause some issues.

1.0.0

  • Initial release.