Skip to content

Commit 50ae6eb

Browse files
authored
feat: use Ctrl-c instead of Ctrl-q as the universal close key for all components (#1047)
1 parent 2683b1d commit 50ae6eb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

yazi-config/preset/keymap.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keymap = [
99
{ on = [ "<C-[>" ], run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
1010
{ on = [ "q" ], run = "quit", desc = "Exit the process" },
1111
{ on = [ "Q" ], run = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" },
12-
{ on = [ "<C-q>" ], run = "close", desc = "Close the current tab, or quit if it is last tab" },
12+
{ on = [ "<C-c>" ], run = "close", desc = "Close the current tab, or quit if it is last tab" },
1313
{ on = [ "<C-z>" ], run = "suspend", desc = "Suspend the process" },
1414

1515
# Navigation
@@ -157,7 +157,7 @@ keymap = [
157157
keymap = [
158158
{ on = [ "<Esc>" ], run = "close", desc = "Hide the task manager" },
159159
{ on = [ "<C-[>" ], run = "close", desc = "Hide the task manager" },
160-
{ on = [ "<C-q>" ], run = "close", desc = "Hide the task manager" },
160+
{ on = [ "<C-c>" ], run = "close", desc = "Hide the task manager" },
161161
{ on = [ "w" ], run = "close", desc = "Hide the task manager" },
162162

163163
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" },
@@ -177,7 +177,7 @@ keymap = [
177177
keymap = [
178178
{ on = [ "<Esc>" ], run = "close", desc = "Cancel selection" },
179179
{ on = [ "<C-[>" ], run = "close", desc = "Cancel selection" },
180-
{ on = [ "<C-q>" ], run = "close", desc = "Cancel selection" },
180+
{ on = [ "<C-c>" ], run = "close", desc = "Cancel selection" },
181181
{ on = [ "<Enter>" ], run = "close --submit", desc = "Submit the selection" },
182182

183183
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" },
@@ -198,7 +198,7 @@ keymap = [
198198
[input]
199199

200200
keymap = [
201-
{ on = [ "<C-q>" ], run = "close", desc = "Cancel input" },
201+
{ on = [ "<C-c>" ], run = "close", desc = "Cancel input" },
202202
{ on = [ "<Enter>" ], run = "close --submit", desc = "Submit the input" },
203203
{ on = [ "<Esc>" ], run = "escape", desc = "Go back the normal mode, or cancel input" },
204204
{ on = [ "<C-[>" ], run = "escape", desc = "Go back the normal mode, or cancel input" },
@@ -267,7 +267,7 @@ keymap = [
267267
[completion]
268268

269269
keymap = [
270-
{ on = [ "<C-q>" ], run = "close", desc = "Cancel completion" },
270+
{ on = [ "<C-c>" ], run = "close", desc = "Cancel completion" },
271271
{ on = [ "<Tab>" ], run = "close --submit", desc = "Submit the completion" },
272272
{ on = [ "<Enter>" ], run = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" },
273273

@@ -289,7 +289,7 @@ keymap = [
289289
{ on = [ "<Esc>" ], run = "escape", desc = "Clear the filter, or hide the help" },
290290
{ on = [ "<C-[>" ], run = "escape", desc = "Clear the filter, or hide the help" },
291291
{ on = [ "q" ], run = "close", desc = "Exit the process" },
292-
{ on = [ "<C-q>" ], run = "close", desc = "Hide the help" },
292+
{ on = [ "<C-c>" ], run = "close", desc = "Hide the help" },
293293

294294
# Navigation
295295
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" },

0 commit comments

Comments
 (0)