Workarounds for broken terminfo that notates Backspace as Ctrl-H

Registered by Paul "LeoNerd" Evans on 2015-06-29

There are many (most?) broken terminfo databases that claim that the Backspace key sends the ASCII BS byte, despite the fact that the terminal is actually observed to send ASCII DEL instead. This confuses the key input parser on the event that a user types a real Ctrl-H combination, because the terminal will probably represent that as a single BS byte, thus leading the parser to presume a Backspace key.

Some thought needs to be put in to how this will work in practice.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Paul "LeoNerd" Evans
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon v0.3
Started by
Paul "LeoNerd" Evans on 2019-02-23
Completed by
Paul "LeoNerd" Evans on 2019-03-18

Related branches

Sprints

Whiteboard

(legacy) vim and tmux both solve this by ignoring what terminfo has to say on the subject of `key_backspace` and instead asking `termios(3)` what it has for `VERASE`. Maybe we should do this?

Context
https://github.com/neovim/neovim/blob/1083c626b9a3fc858c552d38250c3c555cda4074/src/nvim/tui/tui.c#L1982

--

revno: 658
committer: Paul "LeoNerd" Evans <email address hidden>
branch nick: libtickit
timestamp: Sat 2019-02-23 16:03:55 +0000
message:
  Don't indiscriminantly set TERMKEY_CANON_DELBS; instead interrogate termios for what the VERASE char actually is, and claim that is the key_backspace string

(?)

Work Items

Work items:
code: DONE

This blueprint contains Public information 
Everyone can see this information.