- focuschanged
- keypressed
- keyreleased
- mousepressed
- mousereleased
- gamepadpressed
- gamepadreleased
- gamepadpovchanged
- gamepadaxischanged
- error
- warning
- consoleresized
- socketconnected
- socketdisconnected
- socketreceived
- socketerror
- quit
Triggered whenever the active, focused window is changed (such as bringing a new window to the
foreground). Pushes one additional
Triggered whenever a key is pressed (not held down). Pushes two additional values: the virtual key (vk) being pushed and its toggle state.
The toggle state refers to the state that the key is changing to. Ie. the capslock key
will become activated when this returns
See keyboard.getToggleState() and keyboard.pressed() for more information.
Triggered whenever a key is released. Pushes two additional values: the virtual key (vk) being released and its toggle state.
The toggle state refers to the state that the key has just changed to. Ie. the capslock key is
activated when this returns
See keyboard.getToggleState() and keyboard.pressed() for more information.
Triggered whenever a mouse button is pressed. Even though mouse buttons do not typically have a toggle function, a second parameter is returned to standardize functionality.
See keypressed event for more information.
Triggered whenever a mouse button is released. Even though mouse buttons do not typically have a toggle function, a second parameter is returned to standardize functionality.
See keyreleased event for more information.
Triggered whenever a button is pressed on any gamepad. Returns two values: the ID of the gamepad (1-16), and the ID of the button being pressed (1-32).
Triggered whenever a button is released on any gamepad. Returns two values: the ID of the gamepad (1-16), and the ID of the button being pressed (1-32).
Triggered whenever the direction of the POV-hat (aka D-pad) is changed. Returns the gamepad ID (1-16) and new POV direction (0-360 or 655 [centered, not pressed]).
See gamepad.getPOV() and Gamepad global variables for more information
Triggered whenever an axis of a gamepad is changed. Pushes 3 values: ID of gamepad (1-16), ID of axis that was changed, and the actual new value of the axis (0-100).
Gamepad joysticks will generally have two axis each: one for horizontal movement, and one for vertical movement.
See gamepad.getAxis() for more information
Triggered when an error occurs. Not all errors can be recovered from enough to push an error
message. Pushes 1 value: a
Exactly like the error event, except for non-critical errors or other warnings.
Triggered when the MicroMacro console window is resized. Does not push any additional information.
Triggered whenever a new connection is received on a listening socket. Pushes a new socket object that you may use to communicate with this new client, and the socket ID of the listening socket that this client connected to.
Triggered whenever a connection is closed for any reason. The socket ID is pushed; not the socket object.
Triggered whenever any socket receives some information.
On a TCP connection, this pushes the socket ID and the content of the message as a string.
On a UDP connection, this pushes the socket sockAddr and the content of the message as a string. You will use the sockAddr to respond to messages.
Triggered whenever an error is encountered on a socket. Pushes the socket ID and the Winsock error code.
Triggered when the script is just about to terminate. Does not push any additional information.
Page last updated at 2018-09-25 20:47:27