# isNuiFocused (Client)

> Tells whether any interface page has focus.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Web interface
- **URL**: https://wiki.mymp.gg/en/isNuiFocused

## Syntax

```lua
bool isNuiFocused()
```

## Returns

`true` if a page has focus, from any resource.

## Example

```lua
bindKey("f2", "down", function()
    setNuiFocus(not isNuiFocused())
end)
```

## See also

- [setNuiFocus (Client)](https://wiki.mymp.gg/en/setNuiFocus.md): Gives or takes focus from the calling resource's interface page. With focus, the page gets the mouse and the keyboard.
- [setNuiKeepInput (Client)](https://wiki.mymp.gg/en/setNuiKeepInput.md): Chooses whether the game keeps getting the mouse and the keyboard while an interface page has focus.
