Skip to content

T_MSCLoader_Keybind

piotrulos edited this page Apr 7, 2023 · 4 revisions

Keybind Class

Add easily rebindable keybinds.

Inheritance Hierarchy

System.Object
  MSCLoader.Keybind
Namespace: MSCLoader
Assembly: MSCLoader (in MSCLoader.dll) Version: 1.2.11.286

Syntax

C#

public class Keybind

View Source
The Keybind type exposes the following members.

Constructors

 

Name Description
Public method Keybind(String, String, KeyCode) Constructor for Keybind without modifier
Public method Keybind(String, String, KeyCode, KeyCode) Constructor for Keybind
  Back to Top

Properties

 

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

Methods

 

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

See Also

Reference

MSCLoader Namespace

Clone this wiki locally