class RatatuiRuby::Event::FocusLost

Signals that the application is in the background.

The user has switched context. Your application is no longer the primary focus.

This event warns of inactivity. It fires when the terminal window loses focus.

Respond by conserving resources. Pause animations. Stop heavy polling. dim the UI to indicate a background state.

Only supported by some terminals (e.g. iTerm2, Kitty, newer xterm).

Example

if event.focus_lost?
  puts "Focus lost"
end