---
name: "displayRemoveEventHandler"
type: command
status: ok
groups: ["GUI Control - Event Handlers", "Event Handlers"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/displayRemoveEventHandler
revid: 379335
updated: 2026-10-30T23:52:50Z
---

# displayRemoveEventHandler

*Command · GUI Control - Event Handlers, Event Handlers · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Remove a given event handler from the given display.

## Syntax

```sqf
display displayRemoveEventHandler [handlerType, id]
```

**Parameters:**

- `display`: [Display](../topics/Display.md)
- `handlerType`: [String](../topics/String.md) - type of the event handler
- `id`: [Number](../topics/Number.md) - index of the event handler

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
findDisplay 46 displayRemoveEventHandler ["keyDown",5];
```

## See also

[disableSerialization](../commands/disableSerialization.md) · [Display](../topics/Display.md) · [displayAddEventHandler](../commands/displayAddEventHandler.md) · [displayRemoveAllEventHandlers](../commands/displayRemoveAllEventHandlers.md)

## Community notes

**Nelis75733126** — 2015-04-19

If you for example used this code to add the eventHandler:

```sqf
_myEH = findDisplay 46 displayAddEventHandler ["KeyDown", "hint str _this"];
```

Then later in that same script you can use the `_myEH` private variable to remove that same eventHandler again:

```sqf
findDisplay 46 displayRemoveEventHandler ["KeyDown", _myEH];
```

( if obviously that private variable is known to the script environment you are referencing `_myEH` in )

<sub>Source: [BI Community Wiki — displayRemoveEventHandler](https://community.bistudio.com/wiki/displayRemoveEventHandler) (revision 379335).</sub>
