From 1e5b02302baecf680ae6f84d3b3985ef88f325f2 Mon Sep 17 00:00:00 2001 From: DeftDawg Date: Mon, 2 Dec 2024 02:47:42 -0500 Subject: [PATCH] - Add alt keybindings for ctrl+ins = Copy and shift+ins = Paste for non-MacOS systems --- src/config/Config.zig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/config/Config.zig b/src/config/Config.zig index 7fda17289b..93732ca8ce 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -1879,6 +1879,20 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config { .{ .key = .{ .translated = .v }, .mods = mods }, .{ .paste_from_clipboard = {} }, ); + // On non-MacOS desktop envs (Windows, KDE, Gnome, Xfce), ctrl+insert is an + // alt keybinding for Copy and shift+ins is an alt keybinding for Paste + if (!builtin.target.isDarwin()) { + try result.keybind.set.put( + alloc, + .{ .key = .{ .translated = .insert }, .mods = .{ .ctrl = true } }, + .{ .copy_to_clipboard = {} }, + ); + try result.keybind.set.put( + alloc, + .{ .key = .{ .translated = .insert }, .mods = .{ .shift = true } }, + .{ .paste_from_clipboard = {} }, + ); + } } // Increase font size mapping for keyboards with dedicated plus keys (like german)