Skip to main content

claim_keyboard

Function claim_keyboard 

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

Claims the keyboard for an open text input (call it each pass it stays open): while it is claimed, text_input_owns_keyboard is true, so key dispatchers leave Escape and Enter to the input. The claim holds for the pass it is made in and the next one, since a dispatcher runs before the input is drawn. A slider’s typed entry claims it: Escape cancels the entry, Enter commits it, and neither runs a key binding.