SUMMARY kitting a backspace in konsole returns a 0x7f character infocmp shows kbs=^H, which is a 0x08 STEPS TO REPRODUCE 1. hit the backspace 2. obeserve the valur returned 3. scratch head OBSERVED RESULT hitting backspace returns 0x7f EXPECTED RESULT expected backspace to return 0x08 as specified in the terminfo file or for the terminfo file to specify 0x7f which is what the terminal actually returns SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Please check which key binding scheme is selected in "Edit current profile"->Keyboard, "Default" should give the behaviour you want, i.e. Backspace sends \x7f.
thats the INCORRECT response the CORRECT response is for the backspace key to return exactly what terminfo says the backspace key will return. Either terminfo for konsole needs to be changed or konsole needs to be changed. Per terminfo the correct return value for a backspace key is 0x08 or control H not 0x7f
infocmp on my system shows: # Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm-256color xterm-256color|xterm with 256 colors, and: kbs=^? Ctrl+V then Backspace shows '^?' Ctrl+V then Ctrl+Backspace shows '^H' in Konsole, XTerm, and Gnome-terminal.
infocmp -1 in Konsole Reconstructed via infocmp from file: /etc/terminfo/x/xterm-256color kbs=^H,
control v + backspace also returns ^? which is contrary to what terminfo says
xterm returns values in line with what is specified in the terminfo file here, it returns ^H for backspace
I would say this is by design, the details are explained in https://invent.kde.org/utilities/konsole/-/blob/master/doc/user/README.keyboard so Konsole doesn't follow the terminfo in this case, but offers an editor to let the user change it easily.
Oooh so when a USER writes an application using my text user interface github.com/mark4th/uCurses , that application is going to FAIL in konsole because it wont be able to recognize a backspace on every konsole it is run in. yes ****I*** can change MY instance of konsole to perform with CORRECT behavior but me fixing MY konsole does not fix everyone elses. Konsole has incorrect behavior, its not me that needs to fix it :/