From 396e53244d998a7b6097f256a0af1daccf9e62d3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 7 Jun 2025 06:57:11 -0700 Subject: [PATCH] config: add super+shift+t as a default undo too to mimic browsers --- src/config/Config.zig | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/config/Config.zig b/src/config/Config.zig index e1d5b548e..2df66ba45 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -4944,6 +4944,25 @@ pub const Keybinds = struct { .{ .key = .{ .unicode = 'q' }, .mods = .{ .super = true } }, .{ .quit = {} }, ); + try self.set.putFlags( + alloc, + .{ .key = .{ .unicode = 'k' }, .mods = .{ .super = true } }, + .{ .clear_screen = {} }, + .{ .performable = true }, + ); + try self.set.put( + alloc, + .{ .key = .{ .unicode = 'a' }, .mods = .{ .super = true } }, + .{ .select_all = {} }, + ); + + // Undo/redo + try self.set.putFlags( + alloc, + .{ .key = .{ .unicode = 't' }, .mods = .{ .super = true, .shift = true } }, + .{ .undo = {} }, + .{ .performable = true }, + ); try self.set.putFlags( alloc, .{ .key = .{ .unicode = 'z' }, .mods = .{ .super = true } }, @@ -4956,17 +4975,6 @@ pub const Keybinds = struct { .{ .redo = {} }, .{ .performable = true }, ); - try self.set.putFlags( - alloc, - .{ .key = .{ .unicode = 'k' }, .mods = .{ .super = true } }, - .{ .clear_screen = {} }, - .{ .performable = true }, - ); - try self.set.put( - alloc, - .{ .key = .{ .unicode = 'a' }, .mods = .{ .super = true } }, - .{ .select_all = {} }, - ); // Viewport scrolling try self.set.put(