bindKey: Difference between revisions

76 bytes added ,  20 April 2021
no edit summary
No edit summary
No edit summary
Line 3: Line 3:
|type = function
|type = function
|name = bindKey
|name = bindKey
|usage = bind a handler to be called when a specific key is pressed or released
|usage = bind a handler to be called when a specific key is pressed, released, or either pressed/released
|parameters = int keyCode, int keyState, function callback
|parameters = int keyCode, int keyState, function callback
|parameter1 = int keyCode The key code to bind the event for.
|parameter1 = int keyCode The key code to bind the event for.
|parameter2 = int keyState The key state to bind the event for.
|parameter2 = int keyState The key state to bind the event for.
|parameter3 = function callback The scripting function to call when the event occurs.
|parameter3 = function callback The scripting function to call when the specified key is pressed, released, or either pressed/released.
|callbackParametersSS = KeyEvent event, Client client
|callbackParametersSS = KeyEvent event, Client client
|callbackParametersCS = KeyEvent event
|callbackParametersCS = KeyEvent event
6,834

edits