feat: Shift, Alt and Space while selecting a region

This commit is contained in:
elwrcl committed 2026-10-03 02:31:23 +03:00
1 parent 7f9782dc97
commit e0b5d0e9f5
3 files changed
+287 -28

No files matched your search

+12 -4
View File
@@ -483,7 +483,7 @@ impl KeyboardHandler for State {
if let Some(overlay) = &mut self.overlay {
match event.keysym {
Keysym::Escape => overlay.cancel(),
Keysym::space => overlay.switch_to_window(),
Keysym::space => overlay.space(true, qh),
_ => {}
}
}
@@ -508,17 +508,22 @@ impl KeyboardHandler for State {
fn release_key(
&mut self,
_: &Connection,
_: &QueueHandle<Self>,
qh: &QueueHandle<Self>,
_: &wl_keyboard::WlKeyboard,
_: u32,
_: KeyEvent,
event: KeyEvent,
) {
if event.keysym == Keysym::space
&& let Some(overlay) = &mut self.overlay
{
overlay.space(false, qh);
}
}
fn update_modifiers(
&mut self,
_: &Connection,
_: &QueueHandle<Self>,
qh: &QueueHandle<Self>,
_: &wl_keyboard::WlKeyboard,
_: u32,
modifiers: Modifiers,
@@ -528,6 +533,9 @@ impl KeyboardHandler for State {
if let Some(zoom) = &mut self.zoom {
zoom.modifiers(modifiers);
}
if let Some(overlay) = &mut self.overlay {
overlay.modifiers(modifiers, qh);
}
}
}