bindKey

Revision as of 23:49, 20 April 2021 by Mex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

bindKey

Signature: void bindKey(int keyCode, int keyState, function handler)

Usage: bind a handler to be called when a specific key is pressed, released, or either pressed/released

Parameters

int keyCode The key code to bind the event for.
int keyState The key state to bind the event for. KEYSTATE_DOWN, KEYSTATE_UP, or KEYSTATE_BOTH.
function handler The scripting function to call when the specified key is pressed, released, or either pressed/released.

Return

void

On failure: void