Did not realize that the responses had to be processed via tparm() i.e. they should be the actual bytes not the textual representation of them. This broke the backspace key in vim.