# IsFocused()

> Checks if the window has input focus.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windowing](/engine/6000.7/script-reference/unityengine/windowing.md)
* **Assembly:** UnityEngine.WindowingModule

```csharp
public bool IsFocused()
```

### Returns

| Type                                                          | Description                                          |
| ------------------------------------------------------------- | ---------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the window has input focus, false otherwise. |

### Remarks

Only one window can have input focus at a time. The window with input focus receives keyboard input.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Windowing;

public class IsWindowFocusedExample : MonoBehaviour
{
    void Start()
    {
        var window = GameWindow.Main;
        bool focused = window.IsFocused();
        Debug.Log($"Is window focused: {focused}");
    }
}
```
