ii8 / havoc

minimal terminal emulator for wayland
Other
103 stars 17 forks source link

Backspace is treated as Ctrl+H on emacs #11

Closed D4Delta closed 5 years ago

D4Delta commented 5 years ago

To reproduce, launch emacs: emacs -nw Try to find a file using Ctrl+x - Ctrl+f and then use the backspace key : Emacs treat it as a Ctrl+H and open the help menu.

This may be related to this.

One can simply to swap the two keys in emacs ((keyboard-translate ?\C-h ?\C-?) ), but other terminals don't have this problem so I'm wondering if it can be fixed.

(Thanks you for creating the lightest wayland terminal emulator btw!)

ii8 commented 5 years ago

Yeah, havoc sends an 8 (BS/Ctrl+H/backspace) character while xterm seems to default to 127 (DEL/delete.)

xterm allows this to be configured, so we should do the same.

ii8 commented 5 years ago

I was misinformed, xterm and havoc actually behave the same in sending 8. But it seems xterm is simply wrong here, so I've changed it to send 127 and no config necessary.

https://github.com/ii8/havoc/commit/4c65550459ca308a4791f959b559b294c9d6add7

D4Delta commented 5 years ago

Thank you, configuring emacs is not needed now