micro icon indicating copy to clipboard operation
micro copied to clipboard

Keybinding for Redo no working with "Ctrl-Shift-z"

Open webarthur opened this issue 1 year ago • 3 comments
trafficstars

Thats is my ~/.config/micro/bindings.json:

{
    "Alt-e": "CommandMode",
    "Ctrl-Shift-z": "Redo",
    "Ctrl-e": "lua:comment.comment",
    "Ctrl-Shift-e": "command:tree",
    "F5": "lua:wc.wordCount"
}

In general, shortcuts with Ctrl+Shift do not work. The rest all work.

Specifications

Commit hash: 68d88b57 OS: Zorin 17.1 Terminal: Gnome Terminal 3.44

webarthur avatar Apr 18 '24 11:04 webarthur

The terminal sends Ctrl-Shift-z as the same event as Ctrl-z, so micro is not able to distinguish them, it thinks that it receives Ctrl-z, not Ctrl-Shift-z. Unfortunately it is true for most terminals.

You can run the raw command in micro, it will show which key event does micro receive when you press a given key.

dmaluka avatar Apr 18 '24 12:04 dmaluka

for me it doesn't even send Ctrl+Z, just types 122;6u

debuxxed avatar May 31 '25 17:05 debuxxed

How do we hack this? I miss my keybinds as hell that have shift in them from other editors (I use Konsole).

-> https://github.com/CyberShadow/term-keys?tab=readme-ov-file#konsole

But I don't get these escape codes...

pycaw avatar Jun 14 '25 09:06 pycaw