mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
macOS: change default keybinds for equalize splits, jump to prompt -1/+1 (#3078)
From: https://github.com/ghostty-org/ghostty/discussions/2363#discussioncomment-11645228 The justification there makes sense to me and I think it would be a good change to make. Copied here: > There are a few bindings that feel a little weird on macOS. My suggestions: > > (1) Equalize Splits > ``` > keybind = shift+opt+equal=unbind > keybind = ctrl+cmd+equal=equalize_splits > ``` > The default hijacks the `±` character on US keyboards. Believe it or not, I do use ± in the terminal. Ctrl+cmd+equal matches the arrow key bindings in the Window > Resize Split menu and thus looks more elegant and is easier to memorize. > > (2) Jump to Prompt > ``` > keybind = cmd+up=jump_to_prompt:-1 > keybind = cmd+down=jump_to_prompt:1 > ``` > These are the bindings in Terminal.app. The default shift-cmd-up/down is usually associated with extending a selection. Cmd-up/down are available (they currently act as simple up/down). I bind them additionally to the defaults.
This commit is contained in:
@ -2503,10 +2503,22 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
|||||||
);
|
);
|
||||||
try result.keybind.set.put(
|
try result.keybind.set.put(
|
||||||
alloc,
|
alloc,
|
||||||
.{ .key = .{ .translated = .equal }, .mods = .{ .shift = true, .alt = true } },
|
.{ .key = .{ .translated = .equal }, .mods = .{ .super = true, .ctrl = true } },
|
||||||
.{ .equalize_splits = {} },
|
.{ .equalize_splits = {} },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Jump to prompt, matches Terminal.app
|
||||||
|
try result.keybind.set.put(
|
||||||
|
alloc,
|
||||||
|
.{ .key = .{ .translated = .up }, .mods = .{ .super = true } },
|
||||||
|
.{ .jump_to_prompt = -1 },
|
||||||
|
);
|
||||||
|
try result.keybind.set.put(
|
||||||
|
alloc,
|
||||||
|
.{ .key = .{ .translated = .down }, .mods = .{ .super = true } },
|
||||||
|
.{ .jump_to_prompt = 1 },
|
||||||
|
);
|
||||||
|
|
||||||
// Inspector, matching Chromium
|
// Inspector, matching Chromium
|
||||||
try result.keybind.set.put(
|
try result.keybind.set.put(
|
||||||
alloc,
|
alloc,
|
||||||
|
Reference in New Issue
Block a user