gtk: implement command palette

This commit is contained in:
Leah Amelia Chen
2025-04-22 13:09:15 +08:00
parent a090e8eeed
commit 048e4acb2c
8 changed files with 399 additions and 12 deletions

View File

@@ -4736,6 +4736,13 @@ pub const Keybinds = struct {
.{ .toggle_split_zoom = {} },
);
// Toggle command palette, matches VSCode
try self.set.put(
alloc,
.{ .key = .{ .unicode = 'p' }, .mods = inputpkg.ctrlOrSuper(.{ .shift = true }) },
.toggle_command_palette,
);
// Mac-specific keyboard bindings.
if (comptime builtin.target.os.tag.isDarwin()) {
try self.set.put(
@@ -4908,13 +4915,6 @@ pub const Keybinds = struct {
.{ .jump_to_prompt = 1 },
);
// Toggle command palette, matches VSCode
try self.set.put(
alloc,
.{ .key = .{ .unicode = 'p' }, .mods = .{ .super = true, .shift = true } },
.{ .toggle_command_palette = {} },
);
// Inspector, matching Chromium
try self.set.put(
alloc,