> For the complete documentation index, see [llms.txt](https://fig.gitbook.io/fig/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fig.gitbook.io/fig/apps/window-managment/focusing-and-blurring-the-window.md).

# Focusing & Blurring the Window

**Focus**

`fig.focus()` — takes focus away from the terminal and gives it to your app. When the user types, their input will be directed to your app.

**Blur**

`fig.blur()` — returns focus to the terminal window. When the user types, their input will go to shell.

> Note: `fig.run` and `fig.insert` are sensitive to changes to app focus. If you need to use one of them and then change window focus using `fig.blur()` or `fig.focus()`, make sure to delay by at least 500 milliseconds.
>
> ```javascript
> fig.run('whoami')
> setTimeout(() => {
>   fig.focus()
> }, 500)
> ```
