KeybindLib

版本 v1.0.6·更新於 2026-05-10

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

模組介紹 作者原文

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.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

檔案與校驗

檔案名稱
KeybindLib-1.0.6.zip
檔案大小
76.3 KiB