Class Keybinding
Keybinding class
Inheritance
Namespace
Syntax
public class Keybinding
Constructors
Keybinding(string, ConsoleKey, bool)
Makes a new instance of a key binding
Declaration
public Keybinding(string bindingName, ConsoleKey bindingKeyName, bool hidden = false)
Parameters
| Name | Type | Description |
|---|---|---|
| bindingName | string | Key binding name |
| bindingKeyName | ConsoleKey | Which key is bound to the action? |
| hidden | bool | Whether the key binding is hidden or not |
Keybinding(string, ConsoleKey, ConsoleModifiers, bool)
Makes a new instance of a key binding
Declaration
public Keybinding(string bindingName, ConsoleKey bindingKeyName, ConsoleModifiers bindingKeyModifiers, bool hidden = false)
Parameters
| Name | Type | Description |
|---|---|---|
| bindingName | string | Key binding name |
| bindingKeyName | ConsoleKey | Which key is bound to the action? |
| bindingKeyModifiers | ConsoleModifiers | Which modifiers of the key are bound to the action? |
| hidden | bool | Whether the key binding is hidden or not |
Keybinding(string, PointerButton, bool)
Makes a new instance of a mouse pointer binding
Declaration
public Keybinding(string bindingName, PointerButton bindingPointerButton, bool hidden = false)
Parameters
| Name | Type | Description |
|---|---|---|
| bindingName | string | Key binding name |
| bindingPointerButton | PointerButton | Which key is bound to the action? |
| hidden | bool | Whether the key binding is hidden or not |
Keybinding(string, PointerButton, PointerButtonPress, bool)
Makes a new instance of a mouse pointer binding
Declaration
public Keybinding(string bindingName, PointerButton bindingPointerButton, PointerButtonPress bindingPointerButtonPress, bool hidden = false)
Parameters
| Name | Type | Description |
|---|---|---|
| bindingName | string | Key binding name |
| bindingPointerButton | PointerButton | Which button is bound to the action? |
| bindingPointerButtonPress | PointerButtonPress | Which press mode of the button is bound to the action? |
| hidden | bool | Whether the key binding is hidden or not |
Keybinding(string, PointerButton, PointerButtonPress, PointerModifiers, bool)
Makes a new instance of a mouse pointer binding
Declaration
public Keybinding(string bindingName, PointerButton bindingPointerButton, PointerButtonPress bindingPointerButtonPress, PointerModifiers bindingButtonModifiers, bool hidden = false)
Parameters
| Name | Type | Description |
|---|---|---|
| bindingName | string | Key binding name |
| bindingPointerButton | PointerButton | Which button is bound to the action? |
| bindingPointerButtonPress | PointerButtonPress | Which press mode of the button is bound to the action? |
| bindingButtonModifiers | PointerModifiers | Which modifiers of the button are bound to the action? |
| hidden | bool | Whether the key binding is hidden or not |
Properties
BindingHidden
Whether the key binding is hidden or not
Property Value
Declaration
public bool BindingHidden { get; }
BindingKeyModifiers
Which key modifiers are bound to the action?
Property Value
Declaration
public ConsoleModifiers BindingKeyModifiers { get; }
BindingKeyName
Which key is bound to the action?
Property Value
Declaration
public ConsoleKey BindingKeyName { get; }
BindingName
Key binding name
Property Value
Declaration
public string BindingName { get; }
BindingPointerButton
Which pointer button is bound to the action?
BindingPointerButtonPress
Which pointer button press mode is bound to the action?
Property Value
Declaration
public PointerButtonPress BindingPointerButtonPress { get; }
BindingPointerModifiers
Which pointer modifier is bound to the action?
Property Value
Declaration
public PointerModifiers BindingPointerModifiers { get; }
BindingUsesMouse
Whether the binding uses the mouse or the keyboard
Property Value
Declaration
public bool BindingUsesMouse { get; }