input: Allow Escape to cancel grabs

This commit is contained in:
Victoria Brekenfeld 2023-12-11 16:11:20 +00:00 committed by Victoria Brekenfeld
parent e347076145
commit 2e08bde657
2 changed files with 27 additions and 0 deletions

View file

@ -143,6 +143,8 @@ pub enum Action {
Terminate,
Debug,
Close,
#[serde(skip)]
Escape,
Workspace(u8),
NextWorkspace,
@ -317,4 +319,11 @@ pub fn add_default_bindings(
output_next.iter().copied(),
Action::MoveToOutput(output_next_dir),
);
insert_binding(
key_bindings,
KeyModifiers::default(),
std::iter::once(Keysym::Escape),
Action::Escape,
);
}