mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
Add keybind support for shift+insert selection paste
This commit is contained in:
@ -3052,6 +3052,11 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
|
|||||||
.{ .paste = {} },
|
.{ .paste = {} },
|
||||||
),
|
),
|
||||||
|
|
||||||
|
.paste_from_selection => try self.startClipboardRequest(
|
||||||
|
.selection,
|
||||||
|
.{ .paste = {} },
|
||||||
|
),
|
||||||
|
|
||||||
.increase_font_size => |delta| {
|
.increase_font_size => |delta| {
|
||||||
log.debug("increase font size={}", .{delta});
|
log.debug("increase font size={}", .{delta});
|
||||||
|
|
||||||
|
@ -1067,6 +1067,11 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
|||||||
.{ .key = .v, .mods = mods },
|
.{ .key = .v, .mods = mods },
|
||||||
.{ .paste_from_clipboard = {} },
|
.{ .paste_from_clipboard = {} },
|
||||||
);
|
);
|
||||||
|
try result.keybind.set.put(
|
||||||
|
alloc,
|
||||||
|
.{ .key = .insert, .mods = .{ .shift = true } },
|
||||||
|
.{ .paste_from_selection = {} },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fonts
|
// Fonts
|
||||||
|
@ -155,6 +155,7 @@ pub const Action = union(enum) {
|
|||||||
/// Copy and paste.
|
/// Copy and paste.
|
||||||
copy_to_clipboard: void,
|
copy_to_clipboard: void,
|
||||||
paste_from_clipboard: void,
|
paste_from_clipboard: void,
|
||||||
|
paste_from_selection: void,
|
||||||
|
|
||||||
/// Increase/decrease the font size by a certain amount.
|
/// Increase/decrease the font size by a certain amount.
|
||||||
increase_font_size: u16,
|
increase_font_size: u16,
|
||||||
|
Reference in New Issue
Block a user