To simplify the problem, run following command will get the same error
:py3 print(vim.eval('"\\<bs>"'))
And the real situation is
while 1:
vimcmd("let nr = getchar()")
vimcmd("let ch = type(nr) ? nr : nr2char(nr)")
if vimeval('ch == "\\<bs>"') == '1':
dosomething
...
:h Linux-backspace
...?:h :fixdel
and this from Vim wiki: vim.fandom.com/wiki/Backspace_and_delete_problems . ... perhaps some clues can be found there.:py3 print(vim.eval('"\\<bs>"'))
and what is the result?