zyedidia / micro

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

Binding Backspace related keys do not work on Windows #3336

Open Neko-Box-Coder opened 3 months ago

Neko-Box-Coder commented 3 months ago

Description of the problem or steps to reproduce

It seems like Windows is using OldBackspace instead of Backspace, unlike on Linux. This is very similar to #3305 where some keybindings representations work on Linux and some don't on Windows. This one is slightly different though I guess.

So if you have something like

"Alt-Backspace": "DeleteSubWordLeft"

It won't work on Windows. And there isn't any documentation regarding this AFAIK. I think the proper solution is to merge these two bindings into just Backspace and handle the difference ourselves without exposing this technicality to the users.

Specifications

Commit hash: 9face74 OS: Windows Terminal: WezTerm

Neko-Box-Coder commented 3 months ago

I can create a PR later this month that solves both this and #3305 by trying different key representations when handling a key press.