1[
2 // Cursor for MacOS. See: https://docs.cursor.com/kbd
3 {
4 "context": "Workspace",
5 "use_key_equivalents": true,
6 "bindings": {
7 "cmd-i": "agent::ToggleFocus",
8 "cmd-shift-i": "agent::ToggleFocus",
9 "cmd-l": "agent::ToggleFocus",
10 "cmd-shift-l": "agent::ToggleFocus",
11 "cmd-shift-j": "agent::OpenSettings",
12 },
13 },
14 {
15 "context": "Editor && mode == full",
16 "use_key_equivalents": true,
17 "bindings": {
18 "cmd-i": "agent::ToggleFocus",
19 "cmd-shift-i": "agent::ToggleFocus",
20 "cmd-shift-l": "agent::AddSelectionToThread", // In cursor uses "Ask" mode
21 "cmd-l": "agent::AddSelectionToThread", // In cursor uses "Agent" mode
22 "cmd-k": "assistant::InlineAssist",
23 "cmd-shift-k": "assistant::InsertIntoEditor",
24 },
25 },
26 {
27 "context": "InlineAssistant > Editor",
28 "use_key_equivalents": true,
29 "bindings": {
30 "cmd-shift-backspace": "editor::Cancel",
31 "cmd-enter": "menu::Confirm",
32 // "alt-enter": // Quick Question
33 // "cmd-shift-enter": // Full File Context
34 // "cmd-shift-k": // Toggle input focus (editor <> inline assist)
35 },
36 },
37 {
38 "context": "AgentPanel || ContextEditor || (MessageEditor > Editor)",
39 "use_key_equivalents": true,
40 "bindings": {
41 "cmd-i": "workspace::ToggleRightDock",
42 "cmd-shift-i": "workspace::ToggleRightDock",
43 "cmd-l": "workspace::ToggleRightDock",
44 "cmd-shift-l": "workspace::ToggleRightDock",
45 "cmd-w": "workspace::ToggleRightDock", // technically should close chat
46 "cmd-.": "agent::ToggleProfileSelector",
47 "cmd-/": "agent::ToggleModelSelector",
48 "cmd-shift-backspace": "editor::Cancel",
49 "cmd-r": "agent::NewThread",
50 "cmd-shift-v": "editor::Paste",
51 "cmd-shift-k": "assistant::InsertIntoEditor",
52 // "escape": "agent::ToggleFocus"
53 ///// Enable when Zed supports multiple thread tabs
54 // "cmd-t": // new thread tab
55 // "cmd-[": // next thread tab
56 // "cmd-]": // next thread tab
57 ///// Enable if Zed adds support for keyboard navigation of thread elements
58 // "tab": // cycle to next message
59 // "shift-tab": // cycle to previous message
60 },
61 },
62 {
63 "context": "Editor && editor_agent_diff",
64 "use_key_equivalents": true,
65 "bindings": {
66 "cmd-enter": "agent::KeepAll",
67 "cmd-backspace": "agent::RejectAll",
68 },
69 },
70 {
71 "context": "Editor && mode == full && edit_prediction",
72 "use_key_equivalents": true,
73 "bindings": {
74 "cmd-right": "editor::AcceptNextWordEditPrediction",
75 "cmd-down": "editor::AcceptNextLineEditPrediction",
76 },
77 },
78 {
79 "context": "Terminal",
80 "use_key_equivalents": true,
81 "bindings": {
82 "cmd-k": "assistant::InlineAssist",
83 },
84 },
85]