Skip to main content

takes_keys

Function takes_keys 

Source
pub fn takes_keys(ctx: &Context, id: Id)
Expand description

Says that a widget reads Page Up, Page Down, Home or End while focused (call it each pass it is drawn, before the scroll area around it ends), so that the area leaves them to it. A widget sensing drags needs none of this, nor does a text input: a list, a grid or a row of stars does.

A view whose focusable widget lies around its own scroll area rather than in it (a list, a grid) calls it inside the area’s content: the area then knows that the view is the Tab stop, and does not become one itself.

upstream: egui’s widgets read keys without taking them from the input, so a scroll area cannot see what a widget inside it has read (docs/upstream.md, “egui: a scroll area reads no key”).