keybindings: Fix terminal undo

Signed-off-by: Ryan Northey <ryan@synca.io>
This commit is contained in:
Ryan Northey 2026-05-23 15:32:13 +01:00
parent 9eafd070bb
commit b5dca36359

View file

@ -1127,6 +1127,7 @@ where
modifiers, modifiers,
key, key,
physical_key, physical_key,
modified_key,
.. ..
}) if state.is_focused => { }) if state.is_focused => {
for key_bind in self.key_binds.keys() { for key_bind in self.key_binds.keys() {
@ -1173,11 +1174,10 @@ where
} }
} }
(false, true, _, true) => { (false, true, _, true) => {
//This is normally Ctrl+Minus, but since that // Ctrl+Shift+<key>: send 0x1F (C-_) on '_', matching xterm/gnome-terminal.
//is taken by zoom, we send that code for // Use `modified_key` so this works regardless of which physical key
//Ctrl+Underline instead, like xterm and // produces '_' on the user's layout.
//gnome-terminal if *modified_key == Key::Character("_".into()) {
if *key == Key::Character("_".into()) {
terminal.input_scroll(b"\x1F".as_slice()); terminal.input_scroll(b"\x1F".as_slice());
shell.capture_event(); shell.capture_event();
} }