- Bind
- ButtonBind
- KeyAction
- KeyActionRegisteredTooEarlyException
- KeyBind
- Keybind
- KeybindInvalidException
- KeybindRegisteredTooLateException
- KeybindRegistry
- Main
- MethodKeybindExtractor
- MouseBind
KeybindLib
A binding.
Represents the various types of bindings accepted by .
Adds this instance as a default binding for the specified PlayerAction.
Name | Type | Description |
---|---|---|
action | InControl.PlayerAction | The PlayerAction to bind to. |
This method has no parameters.
Converts a InputControlType to a Bind.
This method has no parameters.
This method has no parameters.
KeybindLib.Bind
Creates a new Bind from a InputControlType.
This constructor has no parameters.
Inherit from parent.
This method has no parameters.
KeybindLib.Keybind
A delegate that runs when something interesting happens with a keybind.
Event handler.
KeybindLib.KeybindRegistry
An exception thrown when a KeyAction is registered before this mod has been PreLoaded.
The KeyAction that was registered too early.
KeybindLib.Bind
Creates a new Bind from a Key.
This constructor has no parameters.
Inherit from parent.
This method has no parameters.
KeybindLib
A keybind.
#ctor(name,comesBefore,defaultBinding,defaultBindings,translation,translations,keyPressed,keyReleased,keyDownUpdate) constructor
Creates a new Keybind.
Name | Type | Description |
---|---|---|
name | System.String | The name of this instance. |
comesBefore | System.String | The keybind that this one should come before. |
defaultBinding | KeybindLib.Bind | The default keybind that applies to this instance. |
defaultBindings | KeybindLib.Bind[] | The default keybinds that apply to this instance. Overrides defaultBinding . |
translation | System.String | The english translation for this instance. |
translations | System.Collections.Generic.Dictionary{MessageDirector.Lang,System.String} | The translations that apply to this instance. Overrides translation . |
keyPressed | KeybindLib.Keybind.KeyAction | The KeyAction to run when this key is pressed. |
keyReleased | KeybindLib.Keybind.KeyAction | The KeyAction to run when this key is released. |
keyDownUpdate | KeybindLib.Keybind.KeyAction | The KeyAction to run every frame if this key is down. |
A special string that can be used as ComesBefore to represent the beginning of the list.
The expected prefix that every keybind's name should have.
This instance's .
Only null during PreLoad.
The name of this keybind's corresponding PlayerAction.
The name of the vanilla keybind that should come after this instance.
Indicates where in the list of keybinds this one should go.
The default Binds for this instance.
This instance's name.
Must start with `key.`.
All translations that apply to this instance.
If the Translatio API mod is not installed, only EN will apply.
Binds all DefaultBindings of this instance to the given PlayerAction.
Name | Type | Description |
---|---|---|
action | InControl.PlayerAction | The PlayerAction to bind to. |
Registers this instance's Translations, with either the Translation API or SRML.
This method has no parameters.
Only registers english translations if the Translation API isn't available.
KeybindLib.KeybindRegistry
An exception thrown when an invalid Keybind is registered.
The invalid Keybind in question.
KeybindLib.KeybindRegistry
An exception thrown when a Keybind is registered after this mod has been PreLoaded.
The Keybind that was registered too late.
KeybindLib
Registers Keybinds and keeps track of metadata.
Registers a Keybind.
Name | Type | Description |
---|---|---|
keybind | KeybindLib.Keybind | The Keybind to register. |
Name | Description |
---|---|
KeybindLib.KeybindRegistry.KeybindInvalidException | Thrown when keybind has an invalid Name or ComesBefore. |
KeybindLib.KeybindRegistry.KeybindRegisteredTooLateException | Thrown when this method is called after PreLoad. |
Registered keybinds must have a unique Name and a valid ComesBefore.
Inherit from parent.
Registers a collection of Keybinds.
Name | Type | Description |
---|---|---|
keybinds | System.Collections.Generic.IEnumerable{KeybindLib.Keybind} | The Keybinds to register. |
Registers a KeyAction for a PlayerAction that doesn't have it's own Keybind.
Name | Type | Description |
---|---|---|
playerAction | InControl.PlayerAction | The PlayerAction to register this for. |
keyAction | KeybindLib.Keybind.KeyAction | The KeyAction to run when the key is pressed. |
keyReleased | System.Boolean | If set to true, runs when the key is released instead of when it's pressed. |
Name | Description |
---|---|
KeybindLib.KeybindRegistry.KeyActionRegisteredTooEarlyException | Thrown when this method is called before PreLoad. |
You cannot register a KeyAction until after the PreLoad step.
KeybindLib
This mod's entry point.
Applies all patches. Keybinds must be registered before this is called.
This method has no parameters.
Add "keybindlib" to your mod's "load_after" list to ensure this is called after your keybinds are registered.
KeybindLib
Parses vanilla methods to extract keybind information.
The set of all valid vanilla keybind names.
Mutating this object has no effect. Includes .
KeybindLib.Bind
Creates a new Bind from a Mouse.
This constructor has no parameters.
Inherit from parent.
This method has no parameters.