bindKey: Difference between revisions

Jump to navigation Jump to search
221 bytes added ,  20 April 2021
no edit summary
No edit summary
No edit summary
 
Line 4: Line 4:
|name = bindKey
|name = bindKey
|usage = bind a handler to be called when a specific key is pressed, released, or either pressed/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 handler
|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. KEYSTATE_DOWN, KEYSTATE_UP, or KEYSTATE_BOTH.
|parameter2 = int keyState The key state to bind the event for. KEYSTATE_DOWN, KEYSTATE_UP, or KEYSTATE_BOTH.
|parameter3 = function callback The scripting function to call when the specified key is pressed, released, or either pressed/released.
|parameter3 = function handler The scripting function to call when the specified key is pressed, released, or either pressed/released.
|callbackParametersSS = KeyEvent event, Client client
|callback3SyntaxSS = KeyEvent event, Client client
|callbackParametersCS = KeyEvent event
|callback3ParameterSS1 = KeyEvent event The KeyEvent object for the event.
|callback3ParameterSS2 = Client client The Client who triggered the key event.
|callback3SyntaxCS = KeyEvent event
|callback3ParameterCS1 = KeyEvent event The KeyEvent object for the event.
|return1 = void
|return1 = void
|returnFail1 = void
|returnFail1 = void
6,834

edits

Navigation menu