mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
linux copy/paste defaults to ctrl+shift+c/v
This commit is contained in:
@ -180,16 +180,25 @@ pub const Config = struct {
|
|||||||
const alloc = result._arena.?.allocator();
|
const alloc = result._arena.?.allocator();
|
||||||
|
|
||||||
// Add our default keybindings
|
// Add our default keybindings
|
||||||
try result.keybind.set.put(
|
{
|
||||||
alloc,
|
// On macOS we default to super but Linux ctrl+shift since
|
||||||
.{ .key = .c, .mods = ctrlOrSuper(.{}) },
|
// ctrl+c is to kill the process.
|
||||||
.{ .copy_to_clipboard = {} },
|
const mods: inputpkg.Mods = if (builtin.target.isDarwin())
|
||||||
);
|
.{ .super = true }
|
||||||
try result.keybind.set.put(
|
else
|
||||||
alloc,
|
.{ .ctrl = true, .shift = true };
|
||||||
.{ .key = .v, .mods = ctrlOrSuper(.{}) },
|
|
||||||
.{ .paste_from_clipboard = {} },
|
try result.keybind.set.put(
|
||||||
);
|
alloc,
|
||||||
|
.{ .key = .c, .mods = mods },
|
||||||
|
.{ .copy_to_clipboard = {} },
|
||||||
|
);
|
||||||
|
try result.keybind.set.put(
|
||||||
|
alloc,
|
||||||
|
.{ .key = .v, .mods = mods },
|
||||||
|
.{ .paste_from_clipboard = {} },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Some control keys
|
// Some control keys
|
||||||
try result.keybind.set.put(alloc, .{ .key = .up }, .{ .cursor_key = .{
|
try result.keybind.set.put(alloc, .{ .key = .up }, .{ .cursor_key = .{
|
||||||
|
Reference in New Issue
Block a user