LethalCompany InputUtils

版本 v0.7.13·更新於 2026-03-31

API/Library for creating Unity InputActions with in-game re-binding support. Provides an alternative UI that allows for supporting mods to have in-game re-bindable keybinds.

模組介紹 作者原文

LethalCompany InputUtils

Utilities for creating InputActions and having them be accessible in-game.

InputActions created through this mod are accessible in-game via the keybinds menu added in update v45.

For feature requests or issues head over to my repo

General Users

This mod is just a dependency for other mods, it doesn't add content, but it allows mods to add keybinds.

Where are my bind overrides stored?

Depends on the version of InputUtils:

  • >= 0.7.0 Global: AppData/LocalLow/ZeekerssRBLX/Lethal Company/InputUtils/controls Local: BepInEx/config/controls
  • >= 0.4.1 BepInEx/config/controls

-

That should be all you need to get started.

Otherwise if you don't want to use nuget, you can download the latest release from either the or the Releases.

Extract the zip and add a reference to the dll file of the mod in Visual Studio or Rider.

Initializing Your Binds

  • Create a subclass of LcInputActions
  • An instance of this class will contain all InputActions your mod wishes to bind inputs for
  • Name the class appropriately
  • Create InputActions using Attributes and/or at Runtime

public class MyExampleInputClass: LcInputActions

{

[InputAction(KeyboardControl.G, Name = "Explode")]

public InputAction ExplodeKey { get; set; }

[InputAction("/h", Name = "Another")]

public InputAction AnotherKey { get; set; }

}

Using Attributes

  • Create instance properties for all desired InputActions
  • Annotate the instance properties with the [InputAction(...)] annotation

[!IMPORTANT]

For actions to be registered to the API, Properties MUST be annotated with [InputAction(...)]**

[InputAction("YourkbmPath" / You can also use a KeyboardControl or MouseControl, Name = "", GamepadPath = "", GamepadControl = GamepadControl.None, KbmInteractions = "", GamepadInteractions = "", ActionID = "", ActionType = InputActionType...)]

Required Parameters

You only need to use one of the following overloads:

  • kbmPath: The default bind for Keyboard and Mouse devices
  • keyboardControl: The default bind for Keyboard devices, uses the KeyboardControl Enum
  • mouseControl: The default bind for Mouse devices, uses the MouseControl Enum

Optional Parameters

  • Name: The Displayed text in the game keybinds menu
  • GamepadPath _or_ GamepadControl: The default bind for Gamepad devices. When both are set, GamepadPath will take priority.
  • KbmInteractions: Sets the interactions of the kbm binding. See Interactions Docs
  • GamepadInteractions: Sets the interactions of the gamepad binding. See Interactions Docs
  • ActionID: Overrides the generated actionId (Generally you don't want to change this)
  • ActionType: Determines the behavior with which the action triggers. See ActionType Docs

So your Attribute could be written like this:

[InputAction(KeyboardControl.Minus, Name = "Explode")]

public InputAction ExplodeKey { get; set; }

Or with any combination of optional parameters:

[InputAction(KeyboardControl.Minus, Name = "Explode", GamepadControl = GamepadControl.ButtonNorth, KbmInteractions = "hold(duration = 5)")]

public InputAction ExplodeKey { get; set; }

[!NOTE]

In this case above the Hold Interaction is being used. This keybind triggers after being held for 5 seconds. See Interactions Docs

At Runtime

  • Override Method void CreateInputActions(in InputActionMapBuilder builder)
  • Use the builder to create InputActions
  • Reference InputAction by calling Asset["actionId"] in your class

[!IMPORTANT]

Make sure you call Finish() after you're done creating each InputAction.

Here's an example usage of the runtime api

public class MyExampleInputClass: LcInputActions

{

public static readonly MyExampleInputClass Instance = new();

public InputAction ExplodeKey => Asset["explodekey"];

public override void CreateInputActions(in InputActionMapBuilder builder)

{

builder.NewActionBinding().WithActionId("explodekey").WithActionType(InputActionType.Button).WithKeyboardControl(KeyboardControl.J) // or.WithKbmPath("/j").WithGamepadControl(GamepadControl.ButtonN

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
LethalCompany_InputUtils-0.7.13.zip
檔案大小
294.8 KiB
SHA-256
c5e9e9a6ee8583f36e5c77292900a2e81941441c4324b9a7419db2d7b7600a14
入庫時間
2026-10-06 19:20