zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.39k stars 1.16k forks source link

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

Open webarthur opened 2 months ago

webarthur commented 2 months ago

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

dmaluka commented 2 months ago

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.