From c2deda3231fa38e1bc1d1b06e8b50fc41164578c Mon Sep 17 00:00:00 2001 From: Martin Emde Date: Mon, 3 Nov 2025 20:00:57 -0800 Subject: [PATCH] config: switch certain physical keybinds to unicode Switches several default keybindings from physical key codes `.physical = .equal // or .bracket_left or .bracket_right` to unicode characters `.unicode = '=' // or '[' or ']'` to support alternative keyboard layouts like Dvorak and keyboards with dedicated plus keys (like German layouts). I found in testing that all of these must be fixed at once otherwise the bracket physical keys overshadew the correct (for dvorak) plus key. With this fix, tab and pane navigation (cmd+[], cmd+shift+[]), as well as cmd+shift+equals and cmd+equals work as expected on dvoark layout on MacOS. --- src/config/Config.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/config/Config.zig b/src/config/Config.zig index efe35604d..6a846b17f 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -6107,7 +6107,7 @@ pub const Keybinds = struct { // set the expected keybind for the menu. try self.set.put( alloc, - .{ .key = .{ .physical = .equal }, .mods = inputpkg.ctrlOrSuper(.{}) }, + .{ .key = .{ .unicode = '=' }, .mods = inputpkg.ctrlOrSuper(.{}) }, .{ .increase_font_size = 1 }, ); try self.set.put( @@ -6275,13 +6275,13 @@ pub const Keybinds = struct { ); try self.set.putFlags( alloc, - .{ .key = .{ .physical = .bracket_left }, .mods = .{ .ctrl = true, .super = true } }, + .{ .key = .{ .unicode = '[' }, .mods = .{ .ctrl = true, .super = true } }, .{ .goto_split = .previous }, .{ .performable = true }, ); try self.set.putFlags( alloc, - .{ .key = .{ .physical = .bracket_right }, .mods = .{ .ctrl = true, .super = true } }, + .{ .key = .{ .unicode = ']' }, .mods = .{ .ctrl = true, .super = true } }, .{ .goto_split = .next }, .{ .performable = true }, ); @@ -6607,12 +6607,12 @@ pub const Keybinds = struct { ); try self.set.put( alloc, - .{ .key = .{ .physical = .bracket_left }, .mods = .{ .super = true, .shift = true } }, + .{ .key = .{ .unicode = '[' }, .mods = .{ .super = true, .shift = true } }, .{ .previous_tab = {} }, ); try self.set.put( alloc, - .{ .key = .{ .physical = .bracket_right }, .mods = .{ .super = true, .shift = true } }, + .{ .key = .{ .unicode = ']' }, .mods = .{ .super = true, .shift = true } }, .{ .next_tab = {} }, ); try self.set.put( @@ -6627,12 +6627,12 @@ pub const Keybinds = struct { ); try self.set.put( alloc, - .{ .key = .{ .physical = .bracket_left }, .mods = .{ .super = true } }, + .{ .key = .{ .unicode = '[' }, .mods = .{ .super = true } }, .{ .goto_split = .previous }, ); try self.set.put( alloc, - .{ .key = .{ .physical = .bracket_right }, .mods = .{ .super = true } }, + .{ .key = .{ .unicode = ']' }, .mods = .{ .super = true } }, .{ .goto_split = .next }, ); try self.set.put( @@ -6677,7 +6677,7 @@ pub const Keybinds = struct { ); try self.set.put( alloc, - .{ .key = .{ .physical = .equal }, .mods = .{ .super = true, .ctrl = true } }, + .{ .key = .{ .unicode = '=' }, .mods = .{ .super = true, .ctrl = true } }, .{ .equalize_splits = {} }, );