Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions yazi-config/preset/keymap.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" },
Expand All @@ -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" },
Expand All @@ -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" },
Expand Down Expand Up @@ -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" },

Expand All @@ -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" },
Expand Down