T_MSCLoader_Keybind - piotrulos/MSCModLoader GitHub Wiki

Keybind Class

Add easily rebindable keybinds.

Definition

Namespace: MSCLoader
Assembly: MSCLoader (in MSCLoader.dll) Version: 1.3.1.346

C#

public class Keybind

View Source

Inheritance Object → Keybind

Constructors

Keybind(String, String, KeyCode) Constructor for Keybind without modifier
Keybind(String, String, KeyCode, KeyCode) Constructor for Keybind

Properties

ID The ID of the keybind (Should only be used once in your mod).
Key The KeyCode the user will have to press.
Mod The Mod this Keybind belongs to (This is set when using Keybind.Add).
Modifier The modifier KeyCode the user will have to press with the Key.
Name The name that will be displayed in settings
Vals Helpful additional variables.

Methods

Add(Mod, String, String, KeyCode) Add a keybind.
Add(Mod, String, String, KeyCode, KeyCode) Add a keybind.
AddHeader(Mod, String) Add Header, blue title bar that can be used to separate settings.
AddHeader(Mod, String, Color) Add Header, blue title bar that can be used to separate settings.
AddHeader(Mod, String, Color, Color) Add Header, blue title bar that can be used to separate settings.
Get Return all keybinds for mod.
GetDefault Return all default keybinds for mod.
GetKeybind Check if keybind is being hold down. (Same behaviour as GetKey)
GetKeybindDown Check if the keybind was just pressed once. (Same behaviour as GetKeyDown)
GetKeybindUp Check if the keybind was just released. (Same behaviour as GetKeyUp)
IsDown [DEPRECATED] Checks if the Keybind was just pressed.
Obsolete.
IsPressed [DEPRECATED] Checks if the Keybind is being held down.
Obsolete.

See Also

Reference

MSCLoader Namespace

⚠️ **GitHub.com Fallback** ⚠️