Codenade / ksp2-inputbinder

Input rebinding tool for KSP 2 using Unity's Input System
https://spacedock.info/mod/3422/Inputbinder
MIT License
1 stars 2 forks source link
ksp2 ksp2-mods

Inputbinder

Jump to section

Description

Inputbinder aims to allow users to bind their input devices to the various game actions. It comes with a UI accessible through the game's in-flight app bar or through clicking on the input settings in the pause menu:

Inputbinder in the App-Bar menu
AppBar

Inputbinder App
App

How to install

Prerequisites

Instructions

How to build

Prerequisites

Instructions

build script custom arguments

You can see Cake's built-in options by typing dotnet cake --help

dotnet cake [--target {Clean|Build|Pack|Install|Uninstall|Start}] [--configuration {Release|Debug}] [--ksp2-root <path>]

Option Description
--target {Clean|Build|Pack|Install|Uninstall|Start} Select a build target. The default if not specified is Pack.
If any of Install, Uninstall or Start are used the path to your installation of KSP2 must be specified by either: setting an Environment variable called KSP2_PATH or using the argument --ksp2-root <path>
--configuration {Release|Debug} Select the build configuration. The default is Release.
When the Debug configuration is used a symbols file will be included in the build directory for ease of debugging.
--ksp2-root \<path> Used to specify where KSP2 is installed on your computer.
Alternatively you can specify the path by setting a new the Environment Variable: KSP2_PATH and assigning it the path to your game installation.

Main features

Custom actions created by Inputbinder

Throttle

[!NOTE] Throttle Axis Behavior:

  • When the throttle level axis is moved, it is marked as active.
  • When the throttle delta buttons (default Shift and Ctrl) are pressed, the throttle level axis is marked as inactive.
  • While held, the throttle max and cutoff buttons (default Z/X) take priority over the throttle level axis.
  • When the throttle max and cutoff buttons are released, the throttle level is set back to the axis level if it is active.

Trim

Dedicated actions to change the trim

SAS Mode (AP Mode)

Configuration

The mod settings can be accessed in-game in the flight view through the app-bar or anywhere from the settings menu.

AppBar

There also is a configuration file for advanced settings: Kerbal Space Program 2/BepInEx/config/inputbinder/inputbinder.cfg

Where are my bindings stored?

The bindings and processors are stored in the folder Kerbal Space Program 2/BepInEx/config/inputbinder/profiles inside .json files. Every file holds a set of bindings.
These files are referenced as "input profiles" by this mod's documentation.

Reset the configuration

To reset all bindings click the "Reset All" button in the app's title bar.

Slider settings

To change the range of the sliders inside the processor editing menus, open the file Kerbal Space Program 2/BepInEx/config/inputbinder/inputbinder.cfg inside a text editor.
Now change the values after SliderMin= and SliderMax= to suit your needs.
Then save the file and load/reload any input profile.

Adding more actions from the game to Inputbinder

It is possible to change the bindings for other game actions too.

Make Inputbinder automatically add processors

Open Kerbal Space Program 2/BepInEx/config/inputbinder/inputbinder.cfg in a text editor
(if you didn't delete it yet there should be a default template commented out by the leading # for you to use and modify)

After the default config values add a section: [auto-add-processors]

After this section heading you can configure the automatic adding of processors in the following format:

When<controlA>MappedTo<controlB>="<processors>"

The <control1> <control2> and <processors> placeholders should be replaced by the following:

<controlA>: The newly bound control must match this control-type, one of: Axis, Button, Key, Vector2, Delta, Stick, Dpad, *, Any <controlB>: The binding's expected control-type to match, on of: Axis, Button, Key, Vector2, Delta, Stick, Dpad, *, Any

The control types * and Any match any control

<processors>: The processors to add as they are displayed on the main page of the mod's UI.
The enclosing quotation marks are required.

If you want to find out what the control types of bindings of controls are you can rebind them and open the game's log Kerbal Space Program 2/Ksp2.log and look out for:

Binding complete: <action name> <binding name> with path <bound path>; bound control of type <controlA> to binding of type <controlB>

Your finished configuration file should look something like this:

[main]
SliderMin=-2
SliderMax=2

[auto-add-processors]
WhenButtonMappedToAxis="Scale(factor=0.5)"
WhenAxisMappedToAxis="Scale(factor=0.25);Invert()"

Bug Reports and Feature Requests

Found any bugs🦗? Have an idea to improve things💡? → Open an issue on GitHub.

More info

For more information see: https://github.com/Codenade/ksp2-inputbinder/wiki