From 725e017234b59b377a09a6ccfeb1a93366dfda68 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 10 Nov 2023 17:36:39 -0800 Subject: [PATCH] config: default goto_tab bindings on darwin based on physical key Fixes #817 --- src/config/Config.zig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/config/Config.zig b/src/config/Config.zig index 281194674..cdf7d5cdc 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -874,7 +874,17 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config { try result.keybind.set.put( alloc, - .{ .key = @enumFromInt(i), .mods = mods }, + .{ + .key = @enumFromInt(i), + .mods = mods, + + // On macOS, we use the physical key for tab changing so + // that this works across all keyboard layouts. This may + // want to be true on other platforms as well but this + // is definitely true on macOS so we just do it here for + // now (#817) + .physical = builtin.target.isDarwin(), + }, .{ .goto_tab = (i - start) + 1 }, ); }