feat: use Ctrl-c instead of Ctrl-q as the universal close key for all components (#1047)

This commit is contained in:
三咲雅 · Misaki Masa 2024-05-16 18:40:24 +08:00 committed by GitHub
parent 2683b1d6a2
commit 50ae6ebe39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ keymap = [
{ on = [ "<C-[>" ], run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
{ on = [ "q" ], run = "quit", desc = "Exit the process" },
{ on = [ "Q" ], run = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" },
{ on = [ "<C-q>" ], run = "close", desc = "Close the current tab, or quit if it is last tab" },
{ on = [ "<C-c>" ], run = "close", desc = "Close the current tab, or quit if it is last tab" },
{ on = [ "<C-z>" ], run = "suspend", desc = "Suspend the process" },
# Navigation
@ -157,7 +157,7 @@ keymap = [
keymap = [
{ on = [ "<Esc>" ], run = "close", desc = "Hide the task manager" },
{ on = [ "<C-[>" ], run = "close", desc = "Hide the task manager" },
{ on = [ "<C-q>" ], run = "close", desc = "Hide the task manager" },
{ on = [ "<C-c>" ], run = "close", desc = "Hide the task manager" },
{ on = [ "w" ], run = "close", desc = "Hide the task manager" },
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" },
@ -177,7 +177,7 @@ keymap = [
keymap = [
{ on = [ "<Esc>" ], run = "close", desc = "Cancel selection" },
{ on = [ "<C-[>" ], run = "close", desc = "Cancel selection" },
{ on = [ "<C-q>" ], run = "close", desc = "Cancel selection" },
{ on = [ "<C-c>" ], run = "close", desc = "Cancel selection" },
{ on = [ "<Enter>" ], run = "close --submit", desc = "Submit the selection" },
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" },
@ -198,7 +198,7 @@ keymap = [
[input]
keymap = [
{ on = [ "<C-q>" ], run = "close", desc = "Cancel input" },
{ on = [ "<C-c>" ], run = "close", desc = "Cancel input" },
{ on = [ "<Enter>" ], run = "close --submit", desc = "Submit the input" },
{ on = [ "<Esc>" ], run = "escape", desc = "Go back the normal mode, or cancel input" },
{ on = [ "<C-[>" ], run = "escape", desc = "Go back the normal mode, or cancel input" },
@ -267,7 +267,7 @@ keymap = [
[completion]
keymap = [
{ on = [ "<C-q>" ], run = "close", desc = "Cancel completion" },
{ on = [ "<C-c>" ], run = "close", desc = "Cancel completion" },
{ on = [ "<Tab>" ], run = "close --submit", desc = "Submit the completion" },
{ on = [ "<Enter>" ], run = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" },
@ -289,7 +289,7 @@ keymap = [
{ on = [ "<Esc>" ], run = "escape", desc = "Clear the filter, or hide the help" },
{ on = [ "<C-[>" ], run = "escape", desc = "Clear the filter, or hide the help" },
{ on = [ "q" ], run = "close", desc = "Exit the process" },
{ on = [ "<C-q>" ], run = "close", desc = "Hide the help" },
{ on = [ "<C-c>" ], run = "close", desc = "Hide the help" },
# Navigation
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" },