{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

WindowInfo

public interface WindowInfo


Provides information about the Window that is hosting this compose hierarchy.

Summary

Public methods

default @NonNull PointerKeyboardModifiers

Indicates the state of keyboard modifiers (pressed or not).

abstract boolean

Indicates whether the window hosting this compose hierarchy is in focus.

Public methods

getKeyboardModifiers

@ExperimentalComposeUiApi
default @NonNull PointerKeyboardModifiers getKeyboardModifiers()

Indicates the state of keyboard modifiers (pressed or not).

isWindowFocused

abstract boolean isWindowFocused()

Indicates whether the window hosting this compose hierarchy is in focus.

When there are multiple windows visible, either in a multi-window environment or if a popup or dialog is visible, this property can be used to determine if the current window is in focus.