Page MenuHomePhabricator

Backspace should be ^? rather than ^H
Closed, ResolvedPublic


All other terminals on Linux generate Ascii 127 when pressing the Backspace key, and correspondingly set "stty erase" to ^?. (They may let you alter it, e.g. gnome-terminal does in its "Compatibility" preference tab.) Terminology generates ^H and sets stty erase accordingly.

Although I can't come up with any use cases right now where it causes problems, I'd bet there are some (e.g. when ssh'ing to a remote machine). Doing it differently from all the other terminals is asking for trouble.

See also comments 8-10.

egmont created this task.Jan 5 2014, 3:39 PM
egmont updated the task description. (Show Details)
egmont raised the priority of this task from to Incoming Queue.
egmont added a project: Terminology.
egmont added a subscriber: egmont.
billiob claimed this task.Jan 6 2014, 1:51 AM

There is an option to send ^?.
According to latest terminfo files (and ), xterm and terminology should send ^H.
You can check that with infocmp -I xterm | grep kbs.

billiob triaged this task as Normal priority.Jan 6 2014, 1:51 AM
egmont added a comment.Jan 6 2014, 3:30 AM


infocmp gives me \177. I have no clue if it's because of an older terminfo, or a distro patch.

xterm's actual behavior is controlled by some flags (not necessarily matching terminfo - just like for the Home/End key where it emits ^[[H/^[[F even though terminfo says ^[OH/^[OF, so terminfo is not necessarily the authoritative source). There's ptyInitialErase, backarrowKey, backarrowKeyIsErase, all taking their compiled-in default from --{en,dis}able-whatever configure options, overridable in resource files... and sometimes it uses the tty's actual erase key, which is probably hardwired in the linux kernel, who knows maybe altered by the distro.

I'm lost in the maze. Maybe you're right. All I can say for sure is that on my system (Ubuntu Saucy 13.10) all other terminals emit ^?.

Anyway, it's indeed configurable in Ty, so I'm totally fine with that. :)


billiob removed billiob as the assignee of this task.Jan 29 2015, 3:29 PM
billiob added a subscriber: billiob.
billiob changed the visibility from "All Users" to "Public (No Login Required)".Dec 27 2015, 2:59 PM
billiob closed this task as Resolved.Dec 15 2016, 2:48 PM
billiob claimed this task.

Let's consider this one solved.