Swordfish90 / cool-retro-term

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

Ctrl-h broken when running tmux #748

Open Maroloccio opened 2 years ago

Maroloccio commented 2 years ago

Hi. The following problem (i.e. "Ctrl-h broken inside tmux") happens only if the terminal is cool-retro-term, and does not if it is gnome-terminal:

$ pstree -Aas $$
systemd
  `-systemd --user
      `-gnome-shell
          `-cool-retro-term
              `-bash
                  `-pstree -Aas 80625

I normally run my cool-retro-term with this command for new windows:

bash -c 'TERM=xterm-256color bash -l'

but to help reproducibility of this issue I removed this customisation, which is the only one I make, so:

$ echo "$TERM"
xterm

is how I start. I launch mutt without running tmux and my macro:

bind   index,pager  \Ch  sidebar-open

associating an action with Ctrl-h works just fine. If I exit mutt, launch tmux without any customisation (i.e. no .tmux.conf, no other files) and repeat the experiment of opening mutt and trying to press Ctrl-h, the shortcut is not recognised and mutt reports:

Key is not bound. Press '?' for help.

I would like for the terminal not to make a difference in this case so that I may use cool-retro-terminal with mutt and other programs, please.

My tests have been done on Debian GNU/Linux 11 (bullseye) using two versions of cool-retro-term:

$ type -a cool-retro-term
cool-retro-term is /usr/bin/cool-retro-term
cool-retro-term is /bin/cool-retro-term
cool-retro-term is /snap/bin/cool-retro-term

the OS distribution package one:

$ /usr/bin/cool-retro-term -v
cool-retro-term 1.1.1

and the Snap-installed version, which coincides in version for now with the OS package: 1.1.1.

Thanks :pray: for your work on cool-retro-term and greetings from Italy :it:.

Scribler commented 1 year ago

I was having this same issue, but I found a solution on unix.stackexchange It makes tmux send Ctrl-H when Backspace is pressed and solved the issue for me

https://unix.stackexchange.com/questions/180087/why-pressing-ctrl-h-in-xterm-tmux-sends/180106#180106

Just add the following toy $HOME/.tmux.conf file worked:

" bind-key -n Bspace send-keys C-h "

This link also had some insite into why it might be happening https://github.com/christoomey/vim-tmux-navigator/issues/61

hope this helps