Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get Backspace=^?, Control-BS=^H like in all other terms #770

Closed
mralusw opened this issue Dec 18, 2020 · 6 comments
Closed

Can't get Backspace=^?, Control-BS=^H like in all other terms #770

mralusw opened this issue Dec 18, 2020 · 6 comments

Comments

@mralusw
Copy link

mralusw commented Dec 18, 2020

I'm on one of those maligned LTS distros (Ubuntu Focal, also tried Debian Buster-based), but from what I see in the issues and search results, I don't think my problem is specific. Kinda hard to switch distros at this point to try out the latest qterminal.

I'd like to get Backspace=^?, Control-BS=^H since all other terminals I know of (xterm, urxvt, sakura, xfce4-terminal, st) do that. I've tried the various emulations (linux, solaris) even though I've seen elsewhere "on the net" that only "default" emulation is maintained -- they're worse, instead of swapping ^H and ^?, they only provide one of them.

Expected Behavior

Uh, shouldn't default be like the other terminal emulators? Or at least there should be a clear option to configure BS/Ctrl-BS to send ^H/^? or vice-versa, like in xfce4-terminal. Either via prefs, command line options, X resources, custom files in ~/.config / ~/.local etc.

  • Distribution & Version: Ubuntu Focal, MX 19.3 (Debian Buster-based)
  • Kernel: 5.9
  • Qt Version: 5.11.3 I think
  • qtermwidget Version: 0.14.1
  • lxqt-build-tools Version:
  • Package version: 0.14.1
@mralusw
Copy link
Author

mralusw commented Dec 18, 2020

It seems one can create new entries in /usr/share/qtermwidget5/kb-layouts/, and then those show up in prefs. From strace -f output, qterminal doesn't seem to consult any similar files under $HOME

I'm not sure why b5da2e2 says this is the "default xterm behavior". On Debians, xterm seems to provide ^?/^H, but of course that is infinitely customizable e.g. via XTerm.vt100.translations

@yan12125
Copy link
Member

I'm not sure why b5da2e2 says this is the "default xterm behavior"

^H for Backspace and ^? for Ctrl+Backspace is what I got from xterm 362. Also, ncurses considers as ^H as the backspace key for xterm [1][2].

kbs=^H
key_backspace kbs kb backspace key

[1] https://invisible-island.net/ncurses/terminfo.src.html#tic-xterm_kbs
[2] https://github.com/ThomasDickey/ncurses-snapshots/blob/master/doc/html/man/terminfo.5.html

qterminal doesn't seem to consult any similar files under $HOME

Yep, see #680

If there is a pull request to add an option for swapping output sequences for Backspace and Ctrl+Backscape, I'll be happy to review it, but I don't consider to do that myself in near future. If the current behavior breaks some terminal application, it's more likely that application should be fixed/updated to honor ncurses' terminfo.

@mralusw
Copy link
Author

mralusw commented Dec 21, 2020

So it seems Debian patches xterm indeed, per their Policy: 900_debian_xterm.diff

It seems a bit unfounded to compare qterminal to xterm, of all contenders. For one thing, xterm has tons of ways of configuring keys, at user-level or system-level, and at various points in the session lifetime. For that matter, most other terminals have a way to configure ^H vs ^?. xterm is also the oldest of the bunch: if you picked konsole or gnome-terminal compatibility, that argument would make more sense.

Anyway, it appears that #680 has been filed and perhaps forgotten... Personally I really do hope to see this fixed, as I have picked qterminal to be the best choice after experimenting with several emulators (vertical tabbar, drag&drop filenames, h/v splitting etc -- but I digress)

@yan12125
Copy link
Member

This is more or less the same issue as lxqt/qtermwidget#235. Let's continue discussions there.

@gsantner
Copy link

gsantner commented Nov 13, 2022

Hello, is there any fix already available, or a plan to fix it?

I used many different terminal-emulator applications (and also the non-gui fallback shell) - and qterminal is the only terminal application which not works correctly in this regard.
Pressing backspace does something complete else then in any other emulator, and trying to edit text this way is a chore, as it does something else then removing a character.

Is there any chance for this to be fixed, so backspace works properly like everywhere else?

Just for comparision - 4 different terminal applications. As it was mentioned somewhere that there is an option""to simulate gnome-terminal behaviour"". Not sure about that, i.e. KDE's Qt based konsole also does it right and that out of the box.

screenrecord-2022-11-13_15 27 16

Versions tried: 0.17.0, 0.16.1

Otherwise, thank you very much for this great working yet lightweight piece!

@WyntrHeart
Copy link

@gsantner I found a setting that fixes this issue, although I can't say what else it might also affect. Just change Settings > Behavior > Emulation from "default" to "linux"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants