InputBind

constructor(boundKey: InputConstants.Key, action: InputBind.BindAction, modifiers: Set<InputBind.Modifier>)

Parameters

boundKey

The key that is bound to an action.

action

The action triggered by the bound key (e.g., TOGGLE, HOLD).


constructor(type: InputConstants.Type, code: Int, action: InputBind.BindAction)

Alternative constructor to create a binding from the key type and key code.

Parameters

type

The type of input (keyboard, mouse, etc.).

code

The key or button code.

action

The action to bind to this key.


constructor(name: String)

Constructor to create a binding using a key name.

Parameters

name

The name of the key, which will be translated to an InputUtil.Key.