Swordfish90 / cool-retro-term

A good looking terminal emulator which mimics the old cathode display...
22.11k stars 840 forks source link

Backspace removes whole words in Micro Editor #634

Open fraunos opened 3 years ago

fraunos commented 3 years ago

I tested alacritty and cool-retro-term and it occurs only in the latter. (https://micro-editor.github.io/)

smithandrewl commented 3 years ago

I am also having a simillar issue with Zsh. I am using Zsh on Manjaro with i3, and every time I hit backspace it removes the whole word.

curio77 commented 3 years ago

Same here with fish. I think the issue is that the terminal sends ^? instead of ^H for backspace. It'd be good to have a way of selecting which control sequence to send, as PuTTY and other terminal emulators allow.

samueldy commented 3 years ago

@smithandrewl, I am having the same issue with manjaro zsh. Can confirm that CRT sends ^H instead of ^? for backspace. You could redefine the key:

bindkey '^H' backward-delete-char

in a session or in your .zshrc conditionally (e.g., redefine key if stty -a | egrep '\berase = \^\?' doesn't return 0).

matthias4217 commented 1 year ago

This looks intentional : https://github.com/Swordfish90/qmltermwidget/blob/63228027e1f97c24abb907550b22ee91836929c5/lib/default.keytab#L37

Previously using Gnome Terminal with zsh, I had added bindkey "^H" backward-kill-dir to make Ctrl+Backspace delete whole word and not only a single character. I don’t know enough to give a proper opinion, but it looks like the various terminal emulators have different implementations.