Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:2.00

Description

Description:

Adds an event handler to the given display. Multiple handlers can be assigned to the same event, and are executed in reverse order (the one added last is executed first).

Note: Be aware that the command string must return false, in order for multiple handlers to work (see Return values for details). Reference List contains the full list of handler names, and further details on the event properties.

Syntax

Syntax:display displayAddEventHandler [event, command]
Parameters:
Return Value:Number - ID of the handler (used with displayRemoveEventHandler), or -1 when adding the handler fails.

Examples

Examples:
_ehId = _display displayAddEventHandler ["KeyDown", "hint str _this"]

Additional Information

See also: displaySetEventHandler, displayRemoveEventHandler, ctrlAddEventHandler
Multiplayer: 
Problems: 

Notes