Skip to content

Function: bind_to_dik() ​

Call Signature ​

ts
function bind_to_dik(this: void, action: number): number;

Get the primary DIK key bound to a game action.

Parameters ​

ParameterTypeDescription
thisvoid-
actionnumberGame action id.

Returns ​

number

DIK or mouse/gamepad key code.

Remarks ​

Returns the first binding slot for the action.

Call Signature ​

ts
function bind_to_dik(
   this: void, 
   action: number, 
   index: number): number;

Get a DIK key bound to a game action by binding slot.

Parameters ​

ParameterTypeDescription
thisvoid-
actionnumberGame action id.
indexnumberBinding slot index.

Returns ​

number

DIK or mouse/gamepad key code.

Remarks ​

index selects the action binding slot used by the engine input configuration.