The key labeled "backspace" is a matter of contention. Technically, it ought to send
^H simply because that is the name of the ASCII control character. Others differ, because their expectations have been affected by the history of this feature (see Why doesn't my delete key work?).
In a discussion where you say you are typing, the usual connotation (lacking clarification) is that you have started a terminal, then run a program within the terminal. For that case, there is a corresponding terminal initialization, e.g., using a shell and program such as
stty. This is run on the local machine (where you are typing). MobaXterm provides
stty since Version 3.2 (2011-05-30).
Given that, if MobaXterm sends
^H, your terminal initialization should use
stty erase \^H
See for example What does the command
stty erase ^H do?.
On the other hand, you could have (not apparent in the question) constructed a situation where the terminal is started in a manner that precludes using
stty to make the application and terminal consistent. Or you may have some other reason for changing the behavior of the backspace key. PuTTY (like xterm) provides two mechanisms for this:
- one (originally implemented in rxvt) lets you use the shift modifier to toggle the code sent from "backspace" between ASCII backspace (BS = 8 =
^H) and delete (DEL = 127, often shown as
- the other is the terminal configuration (a dialog setting in the Keyboard section of the Terminal section).
xterm provides a third mechanism which PuTTY appears to lack (see XTerm Control Sequences):
CSI ? Pm h
DEC Private Mode Set (DECSET).
Ps = 6 7 -> Backarrow key sends backspace (DECBKM).
If PuTTY did implement that, your application could set the behavior of the terminal directly. Rather, during initialization, PuTTY checks the initial state of its configuration and (depending on platform) also checks (like xterm) the terminal modes set in the device, and chooses a backspace versus delete behavior which you can accommodate or amend as noted.