# GetTypeForControl(int)

> Get a filtered event type for a given control ID.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.IMGUIModule

```csharp
public EventType GetTypeForControl(int controlID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The ID of the control you are querying from.

### Returns

| Type                                                                  | Description |
| --------------------------------------------------------------------- | ----------- |
| [EventType](/engine/6000.6/script-reference/unityengine/eventtype.md) |             |

### Remarks

This function is used to implement mouse locking and keyboard focus. The controlID can be obtained from [GUIUtility.GetControlID()](/engine/6000.6/script-reference/unityengine/guiutility/getcontrolid.md).

Additional Resources: [EventType](/engine/6000.6/script-reference/unityengine/eventtype.md) for the list of possible values.
