# HasMouseCapture(IEventHandler)

> Checks if the event handler is capturing the mouse.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.3/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public static bool HasMouseCapture(this IEventHandler handler)
```

### Parameters

**** (\[IEventHandler]\(/engine/6000.3/script-reference/unityengine/uielements/ieventhandler)): Event handler to check.

### Returns

| Type                                                          | Description                             |
| ------------------------------------------------------------- | --------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the handler captures the mouse. |
