Skip to content

Function: dik_to_bind()

Call Signature

ts
function dik_to_bind(this: void, keycode: number): number;

Transforms dik key enumeration code to key binding code.

Parameters

ParameterTypeDescription
thisvoid-
keycodenumberDIK or mouse/gamepad key code.

Returns

number

Bound game action id.

Remarks

Uses the default input context.

Call Signature

ts
function dik_to_bind(
   this: void, 
   keycode: number, 
   context: number): number;

Transform a DIK key code to a game action in a specific input context.

Parameters

ParameterTypeDescription
thisvoid-
keycodenumberDIK or mouse/gamepad key code.
contextnumberInput context id.

Returns

number

Bound game action id.

Remarks

Context values are exported by key_bindings_context in the engine binding.