Table of Contents

Class KeyCombination

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Mapping of an input key combination. Note: the "key" might also be a mouse button if a hotkey has been configured to be activated by a mouse button

public class KeyCombination
Inheritance
KeyCombination
Inherited Members
Extension Methods

Fields

Alt

Alt pressed condition.

public bool Alt

Field Value

bool

Ctrl

Ctrl pressed condition.

public bool Ctrl

Field Value

bool

KeyCode

The KeyCode (from 1.19.4, the keycodes map to either keys or mouse buttons)

public int KeyCode

Field Value

int

MouseStart

The first keycode representing a mouse button

public const int MouseStart = 240

Field Value

int

OnKeyUp

public bool OnKeyUp

Field Value

bool

SecondKeyCode

The second key code (if it exists).

public int? SecondKeyCode

Field Value

int?

Shift

Shift pressed condition.

public bool Shift

Field Value

bool

Methods

Clone()

Clones the current key combination.

public KeyCombination Clone()

Returns

KeyCombination

The cloned key combination.

IsMouseButton(int)

public bool IsMouseButton(int KeyCode)

Parameters

KeyCode int

Returns

bool

PrimaryAsString()

public string PrimaryAsString()

Returns

string

SecondaryAsString()

public string SecondaryAsString()

Returns

string

ToString()

Converts this key combination into a string.

public override string ToString()

Returns

string

The string code for this Key Combination.