---
name: "ctrlSetFocus"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/ctrlSetFocus
revid: 373983
updated: 2025-07-13T08:12:31Z
---

# ctrlSetFocus

*Command · GUI Control · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## Description

Sets the input focus on given control.

> [!IMPORTANT]
> - [ctrlSetFocus](../commands/ctrlSetFocus.md) seems to only work on controls that accept any input from keyboard or mouse.
> - if [ctrlSetFocus](../commands/ctrlSetFocus.md) is used on a CT_CONTROLS_GROUP that contains an interactable control, that control will automatically be active.
> - if [ctrlSetFocus](../commands/ctrlSetFocus.md) is used on a CT_CONTROLS_GROUP in which there are no interactable controls, then [ctrlSetFocus](../commands/ctrlSetFocus.md) will do nothing.

## Syntax

```sqf
ctrlSetFocus control
```

**Parameters:**

- `control`: [Control](../topics/Control.md)

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

## Examples

### Example 1

```sqf
ctrlSetFocus _control;
```

## See also

[focusedCtrl](../commands/focusedCtrl.md)

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