pub fn grab_input<F>(with_input: F)Expand description
Grabs keyboard input.
All keyboard input will be redirected to this grabber (assuming another exclusive layer surface doesn’t open). Keybinds will still work.
Don’t forget to add a way to close the grabber, or else input will be grabbed forever!
§Examples
input_grab::grab_input(|grabber, key, mods| {
if key == Keysym::e {
println!("An `e` was pressed!");
}
if key == Keysym::Escape {
grabber.stop();
}
});