https://bugs.winehq.org/show_bug.cgi?id=52531
Bug ID: 52531 Summary: Can not use backspace to delete in cmd in xterm Product: Wine Version: 7.1 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: huupoke12@gmail.com Distribution: ---
When running cmd with `wine cmd`, the shell run Wine's cmd. But when I press "Backspace" on the keyboard to delete the previous character, the Wine's cmd instead display "^H" instead of delete the character.
The terminal emulator I'm using is `xterm`, which use "Backspace" control character (\x08) instead of "Delete" control character (\x7f) as the Erase character.
Terminal output ``` $ wine cmd Microsoft Windows 6.1.7601
Z:\home\huupoke12>aaaa^H^H^H ```
https://bugs.winehq.org/show_bug.cgi?id=52531
Eric Pouech eric.pouech@orange.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@orange.fr
--- Comment #1 from Eric Pouech eric.pouech@orange.fr --- wine expects a vt220 capable terminal (which is normally what Linux provides)
what's you TERM env variable set to? (under xterm)
not sure we want to support all kinds of underlying terminal capabilities
using 'TERM=vt220 wine cmd' should work around the issue (assuming vt220 termcap/terminfo is installed on your box)
https://bugs.winehq.org/show_bug.cgi?id=52531
--- Comment #2 from Nguyễn Chính Hữu huupoke12@gmail.com --- My TERM variable (under xterm) is "xterm". Setting TERM variable to "vt220" doesn't work around the issue.
I think most of Linux distro also set TERM variable to "xterm" or "xterm-256color", so I don't think xterm is an unpopular terminal emulator.
https://bugs.winehq.org/show_bug.cgi?id=52531
--- Comment #3 from Eric Pouech eric.pouech@orange.fr --- can't reproduce here: xterm works fine
----------
so it's really how the terminfo/termcap of xterm is defined
I suppose 'infocmp xterm | grep kbs' shows kbs=^H (or similar) on your side
while I have kbs=^?
which is what we expect (and what a "standard" configuration should be)
----------
the work around is to find a suitable $TERM value for running cmd.exe (perusing a bit, maybe 'gnome' could work) (again 'infocmp gnome | grep kbs' should tell)
https://bugs.winehq.org/show_bug.cgi?id=52531
--- Comment #4 from Nguyễn Chính Hữu huupoke12@gmail.com --- It seems the problem is partly caused by the inconsistency between upstream developer and downstream distributors of defining the kbs.
In the upstream, the default kbs of xterm is "^H": https://invisible-island.net/ncurses/terminfo.src.html#tic-xterm_kbs So I don't think it is a "standard configuration" if the upstream developer doesn't make it default but something else.
Arch Linux doesn't override it, follows the upstream configuration: https://github.com/archlinux/svntogit-packages/blob/packages/ncurses/trunk/P... Gentoo Linux also seems to not override it: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-libs/ncurses/ncurses-6.2_...
Debian (and Ubuntu) overrides it with "del": https://sources.debian.org/src/ncurses/6.2%2B20201114-2/debian/rules/#L153 Fedora overrides it with "DEL": https://src.fedoraproject.org/rpms/ncurses/blob/rawhide/f/ncurses.spec#_139 openSUSE overrides it with "del" (line 531): https://build.opensuse.org/package/view_file/Base:System/ncurses/ncurses.spe...