diff --git a/src/Surface.zig b/src/Surface.zig index 53981eb70..6a4ae7705 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -3052,6 +3052,11 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool .{ .paste = {} }, ), + .paste_from_selection => try self.startClipboardRequest( + .selection, + .{ .paste = {} }, + ), + .increase_font_size => |delta| { log.debug("increase font size={}", .{delta}); diff --git a/src/config/Config.zig b/src/config/Config.zig index f623f52af..8a0de7c4e 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -213,7 +213,7 @@ const c = @cImport({ /// A named theme to use. The available themes are currently hardcoded to the /// themes that ship with Ghostty. On macOS, this list is in the `Ghostty.app/ -/// Contents/Resources/ghostty/themes` directory. On Linux, this list is in the +/// Contents/Resources/ghostty/themes` directory. On Linux, this list is in the /// `share/ghostty/themes` directory (wherever you installed the Ghostty "share" /// directory. /// @@ -1067,6 +1067,11 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config { .{ .key = .v, .mods = mods }, .{ .paste_from_clipboard = {} }, ); + try result.keybind.set.put( + alloc, + .{ .key = .insert, .mods = .{ .shift = true } }, + .{ .paste_from_selection = {} }, + ); } // Fonts diff --git a/src/input/Binding.zig b/src/input/Binding.zig index 54ab88c91..021514903 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -155,6 +155,7 @@ pub const Action = union(enum) { /// Copy and paste. copy_to_clipboard: void, paste_from_clipboard: void, + paste_from_selection: void, /// Increase/decrease the font size by a certain amount. increase_font_size: u16,