mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-22 19:56:08 +03:00
modify cmd+9 behaviour
This commit is contained in:

committed by
Mitchell Hashimoto

parent
bee2188014
commit
2555f09d88
@ -2303,11 +2303,6 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// Cmd+N for goto tab N
|
|
||||||
const start = @intFromEnum(inputpkg.Key.one);
|
|
||||||
const end = @intFromEnum(inputpkg.Key.nine);
|
|
||||||
var i: usize = start;
|
|
||||||
while (i <= end) : (i += 1) {
|
|
||||||
// On macOS we default to super but everywhere else
|
// On macOS we default to super but everywhere else
|
||||||
// is alt.
|
// is alt.
|
||||||
const mods: inputpkg.Mods = if (builtin.target.isDarwin())
|
const mods: inputpkg.Mods = if (builtin.target.isDarwin())
|
||||||
@ -2315,6 +2310,11 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
|||||||
else
|
else
|
||||||
.{ .alt = true };
|
.{ .alt = true };
|
||||||
|
|
||||||
|
// Cmd+N for goto tab N
|
||||||
|
const start = @intFromEnum(inputpkg.Key.one);
|
||||||
|
const end = @intFromEnum(inputpkg.Key.eight);
|
||||||
|
var i: usize = start;
|
||||||
|
while (i <= end) : (i += 1) {
|
||||||
try result.keybind.set.put(
|
try result.keybind.set.put(
|
||||||
alloc,
|
alloc,
|
||||||
.{
|
.{
|
||||||
@ -2333,6 +2333,17 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
|||||||
.{ .goto_tab = (i - start) + 1 },
|
.{ .goto_tab = (i - start) + 1 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
try result.keybind.set.put(
|
||||||
|
alloc,
|
||||||
|
.{
|
||||||
|
.key = if (comptime builtin.target.isDarwin())
|
||||||
|
.{ .physical = .nine }
|
||||||
|
else
|
||||||
|
.{ .translated = .nine },
|
||||||
|
.mods = mods,
|
||||||
|
},
|
||||||
|
.{ .last_tab = {} },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toggle fullscreen
|
// Toggle fullscreen
|
||||||
@ -2437,11 +2448,6 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
|||||||
.{ .key = .{ .translated = .right_bracket }, .mods = .{ .super = true, .shift = true } },
|
.{ .key = .{ .translated = .right_bracket }, .mods = .{ .super = true, .shift = true } },
|
||||||
.{ .next_tab = {} },
|
.{ .next_tab = {} },
|
||||||
);
|
);
|
||||||
try result.keybind.set.put(
|
|
||||||
alloc,
|
|
||||||
.{ .key = .{ .physical = inputpkg.Key.zero }, .mods = .{ .super = true } },
|
|
||||||
.{ .last_tab = {} },
|
|
||||||
);
|
|
||||||
try result.keybind.set.put(
|
try result.keybind.set.put(
|
||||||
alloc,
|
alloc,
|
||||||
.{ .key = .{ .translated = .d }, .mods = .{ .super = true } },
|
.{ .key = .{ .translated = .d }, .mods = .{ .super = true } },
|
||||||
|
Reference in New Issue
Block a user