---
name: "disableUserInput"
type: command
status: ok
groups: ["Interaction"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/disableUserInput
revid: 373274
updated: 2025-04-13T14:35:36Z
---

# disableUserInput

*Command · Interaction · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: effect **local**

## Description

Disables or enables the keyboard and mouse input. Usually used during cutscenes.

> [!WARNING]
> Be careful and responsible with the usage of this command. Once the user input is disabled, the only option left is to restart the game. Make sure you provide scripted mechanics to resolve this, should you need to disable user input for any reason.

## Syntax

```sqf
disableUserInput state
```

**Parameters:**

- `state`: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to disable, [false](../commands/false.md) to enable

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

## Examples

### Example 1

```sqf
disableUserInput true;
// cutscene
disableUserInput false;
```

### Example 2

Reset user input if a key was pressed:

```sqf
disableUserInput true;    // here e.g W was pressed
sleep 2;                // the user releases keys
disableUserInput false;    // the game considers W is still pressed as it did not listen to a "KeyUp" event

disableUserInput true;
disableUserInput false;    // this resets released keys making the issue invisible

// this workaround does not fix the mouse input that may get stuck on [[disableUserInput]] call
```

## See also

[userInputDisabled](../commands/userInputDisabled.md) · [enableSimulation](../commands/enableSimulation.md) · [enableSimulationGlobal](../commands/enableSimulationGlobal.md)

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