micro
micro copied to clipboard
Ctrl-c (copy) does not work
The keybinding Ctrl-c works fine in my terminal but does not work on micro even if it's set on bindings.json. The copy function works ok if I press Ctrl-Shift-c. Ctrl-v (paste) also works ok.
Ctrl-c works out of the box on Linux Mint (i3wm) and MX-Linux (i3wm), both using Xfce4 terminal.
xclip is installed.
Commit hash: Micro 2.0.10 (comit hash b9763856). OS: Arco Linux with 3wm. Terminal: Xfce4-terminal
Content of my bindings.json file:
{
"Alt-/": "lua:comment.comment",
"Alt-a": "lua:snippets.Accept",
"Alt-d": "lua:snippets.Cancel",
"Alt-s": "lua:snippets.Insert",
"Alt-w": "lua:snippets.Next",
"CtrlUnderscore": "lua:comment.comment",
"Ctrl-c": "Copy",
"Ctrl-v": "Paste",
"Ctrl-x": "Cut",
"Ctrl-y": "Redo",
"Ctrl-z": "Undo"
}
My settings file:
{
"colorscheme": "nord-16"
}
Plugins installed: detectindent, micro-snippets-plugin, nordcolors. If I delete all of them there's no change on this problem.
Thanks for your help.
@Itookmyprozac can you try opening Micro, pressing Ctrl+e
, and typing set clipboard external
?
Done but no changes unfortunately. Only Ctrl+Shift+c works. It's not a big deal but I always lose a couple of seconds using Ctrl+c and then Ctrl+Shift+c because I'm used to use micro on every device with the first one.
Edit: I've discovered that Ctrl+c works ok using Alacritty so this problem only shows up when using Xfce4-terminal even the key binding (gtk_accel_path "<Actions>/terminal-window/copy" "<Primary>c")
is set as usual in the accels.scm file.
I'm on Manjaro / sway / wayland / alacritty, and pressing Ctrl+e
and typing set clipboard terminal
solved the problem for me.
I found next: if your terminal emulator consumes the clipboard-copy
action by Ctrl+Shift+C
then micro will have Copy : Ctrl+C
. Otherwise, if your terminal emulator consumes theclipboard-copy
by Ctrl+C
then micro will have Copy : Ctrl+Shift+C
.
Env: Sway + foot.
I found next: if your terminal emulator consumes the
clipboard-copy
action byCtrl+Shift+C
then micro will haveCopy : Ctrl+C
. Otherwise, if your terminal emulator consumes theclipboard-copy
byCtrl+C
then micro will haveCopy : Ctrl+Shift+C
.Env: Sway + foot.
You're right. Now it works.
I had to disable the keybinding Ctrl+c on Xfce-terminal (and also the autocopy selection) in order to allow micro to use that keybinding.
It's odd since I use this terminal and editor in other distros with the same WM. Well, in Arco Linux I'll have to use this workaround.
Thanks.
so, problem solved? can this issue be closed then?
No. I though it was working, but it's not.
The content of my bindings.json:
{
"Alt-/": "lua:comment.comment",
"Alt-a": "lua:snippets.Accept",
"Alt-d": "lua:snippets.Cancel",
"Alt-s": "lua:snippets.Insert",
"Alt-w": "lua:snippets.Next",
"CtrlUnderscore": "lua:comment.comment",
"Ctrl-c": "Copy",
"Ctrl-v": "Paste",
"Ctrl-x": "Cut",
"Ctrl-y": "Redo",
"Ctrl-z": "Undo"
}
Ctrl+X does not work either.
It's a weird problem since I can paste text that it's copied from terminal into micro but I can't do the same if I try to copy & paste in micro. It happens the same also using Alacritty.
The copy action shows the message "Copied selection" but if I try to paste micro shows the message "no clipboard received from terminal".