InputProfile

data class InputProfile(val pointer: InputProfile.Pointer, val keyboard: InputProfile.Keyboard, val posture: InputProfile.Posture, val distance: InputProfile.Distance)(source)

What the user is pointing and typing with, and how the panel is folded — the axes FormFactor deliberately cannot express.

FormFactor answers "how far away is the eye" by asking the platform what kind of device this is, which is the right question for a token scale but the wrong one for an affordance. A phone with a paired Bluetooth mouse is still Handheld, yet it wants Fine-pointer hit targets; a foldable in Tabletop posture is still Handheld, yet the bottom half is a keyboard tray. Compose 1.12's mediaQuery reports those directly, so this reads them rather than guessing from width.

The experimental opt-in is contained here on purpose. Consumers read these stable enums and never import androidx.compose.ui.UiMediaScope, so when the API changes shape — and being @Experimental it will — exactly one file in the family needs editing rather than four apps.

Constructors

Link copied to clipboard
constructor(pointer: InputProfile.Pointer, keyboard: InputProfile.Keyboard, posture: InputProfile.Posture, distance: InputProfile.Distance)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Eye-to-panel distance. Maps to the 10-foot / arm's-length / wrist distinction.

Link copied to clipboard
Link copied to clipboard

Precision of the pointing device. Blunt is a TV remote or a gaze cursor, not a finger.

Link copied to clipboard

Foldable hinge posture. Flat covers every non-folding device.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard