FS#50000 - [st] Inconsistent backspace behavior

Attached to Project: Community Packages
Opened by Alif (alive4ever) - Saturday, 09 July 2016, 04:29 GMT
Last edited by Sergej Pupykin (sergej) - Monday, 15 August 2016, 11:17 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Backspace is recognized as ^?, whereas alt+backspace is recognized as ^[^H. Alt+Backspace should be interpreted as ^[^?.

This inconsistent behavior leads to bad user experience. For example: on emacs, you won't be able to delete a word by pressing alt+backspace.


Additional info:
* package version(s): st-0.6-3
* config and/or log files etc.


Steps to reproduce:
Open 'st' terminal (for example 'st -f "Dejavu Sans Mono:size=16"'), since the default font is so bad.
Run 'showkey --ascii' to interpret what is typed on the terminal emulator.
Press backspace and then press alt+backspace.
Notice the inconsistent behavior.
^? 127 0177 0x7f
^[^H 27 0033 0x1b
8 0010 0x08

Using the patch I attached below, backspace behavior will be consistent (i.e. alt+backspace is recognized as ^[^?).
^? 127 0177 0x7f
^[^? 27 0033 0x1b
127 0177 0x7f
This task depends upon

Closed by  Sergej Pupykin (sergej)
Monday, 15 August 2016, 11:17 GMT
Reason for closing:  Fixed
Additional comments about closing:  updated to 0.7
Comment by Doug Newgard (Scimmia) - Saturday, 09 July 2016, 04:55 GMT
Pretty sure this is the same as  FS#49352 . Try that patch, see if it fixes your issue.
Comment by Alif (alive4ever) - Saturday, 09 July 2016, 06:32 GMT
Nope. The suckless delkey patch doesn't related to this problem. The delkey patch is just workaround to make ^H behaves as backspace.

This bug report is to ensure consistent default backspace behavior, which is interpreted as ^?. So that, even with alt (meta) pressed, backspace will always be recognized as ^?).
Comment by Alif (alive4ever) - Saturday, 09 July 2016, 06:38 GMT
I also recommend against suckless delkey patch, because it breaks emacs behavior as pressing backspace brings up help dialog.
Instead of ^H as backspace, it's better to stick with ^? as backspace, but with more consistent behavior.
Comment by Doug Newgard (Scimmia) - Saturday, 09 July 2016, 12:10 GMT
Strange, the mailing list specifically says this should fix your issue, unless I'm reading it completely wrong.
Comment by Alif (alive4ever) - Sunday, 17 July 2016, 08:01 GMT

Loading...