From 25227f71ef437d5dba0a4d83a896c3081f3a73a3 Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Thu, 22 Jan 2026 23:54:19 +0100 Subject: [PATCH] Fix default keybindings for Ctrl-c and Ctrl-x in command mode Micro doesn't support chained actions for command mode keybindings yet, it only supports them for regular buffer keybindings. Whereas Ctrl-c and Ctrl-v are bound by default to the chained actions Copy|CopyLine and Cut|CutLine in both buffer mode and command mode, so in command mode Ctrl-c and Ctrl-v don't work at all (with default keybindings). Luckily CopyLine and CutLine would not be not very useful in command mode anyway. So fix the issue by changing the default keybindings in command mode to the simple non-chained actions Copy and Cut. --- internal/action/defaults_darwin.go | 4 ++-- internal/action/defaults_other.go | 4 ++-- runtime/help/keybindings.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/action/defaults_darwin.go b/internal/action/defaults_darwin.go index 74d18e8375..44b4fcc1ae 100644 --- a/internal/action/defaults_darwin.go +++ b/internal/action/defaults_darwin.go @@ -146,8 +146,8 @@ var infodefaults = map[string]string{ "Backtab": "CycleAutocompleteBack", "Ctrl-z": "Undo", "Ctrl-y": "Redo", - "Ctrl-c": "Copy|CopyLine", - "Ctrl-x": "Cut|CutLine", + "Ctrl-c": "Copy", + "Ctrl-x": "Cut", "Ctrl-k": "CutLine", "Ctrl-v": "Paste", "Home": "StartOfTextToggle", diff --git a/internal/action/defaults_other.go b/internal/action/defaults_other.go index 90a535f6cb..10e5b08358 100644 --- a/internal/action/defaults_other.go +++ b/internal/action/defaults_other.go @@ -149,8 +149,8 @@ var infodefaults = map[string]string{ "Backtab": "CycleAutocompleteBack", "Ctrl-z": "Undo", "Ctrl-y": "Redo", - "Ctrl-c": "Copy|CopyLine", - "Ctrl-x": "Cut|CutLine", + "Ctrl-c": "Copy", + "Ctrl-x": "Cut", "Ctrl-k": "CutLine", "Ctrl-v": "Paste", "Home": "StartOfTextToggle", diff --git a/runtime/help/keybindings.md b/runtime/help/keybindings.md index 5ed5857082..50dc4057c4 100644 --- a/runtime/help/keybindings.md +++ b/runtime/help/keybindings.md @@ -699,8 +699,8 @@ are given below: "Backtab": "CycleAutocompleteBack", "Ctrl-z": "Undo", "Ctrl-y": "Redo", - "Ctrl-c": "Copy|CopyLine", - "Ctrl-x": "Cut|CutLine", + "Ctrl-c": "Copy", + "Ctrl-x": "Cut", "Ctrl-k": "CutLine", "Ctrl-v": "Paste", "Home": "StartOfTextToggle",