config: default goto_tab bindings on darwin based on physical key

Fixes #817
This commit is contained in:
Mitchell Hashimoto
2023-11-10 17:36:39 -08:00
parent a8614815d6
commit 725e017234

View File

@ -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 },
);
}