Michael Sperber [Mr. Preprocessor] wrote:
>> I really felt stupid when someone asked me how to make
Backspace
>> delete backwards in TTY mode, and I didn't know. This seems to be FAQ
>> material, but isn't in the FAQ.
kazz> You could just do "stty erase ^H", instead of using "Delete"
for
kazz> erase.
kazz> You'd lose Backspace for help-command prefix but you could use f1.
Sure, F1 works. But I don't really want to globally use ^H for
erase. Why can't I rebind the damn key in XEmacs?
Maybe I'm missing your point, as the following seems too obvious. If
your Backspace key generates \010, then XEmacs can't tell the
difference between Backspace and C-h. This is the main reason why most
of the terminal users which I know configure their terminals so that
Backspace generates \177.
The only thing that you should really need to do to get the Backspace
key to delete backwards is to ensure that the terminal's erase setting
is correct (or set tty-erase-char manually). Then character_to_event
will convert that character to the 'backspace keysym, which always
deletes backwards.
It shouldn't even be necessary to tell people that their terminal
driver has to be configured correctly. I guess that this is one of the
down sides to readline (which usually works OK regardless of whether
your terminal driver has a misconfigured erase setting, so a user may
not spot the error until trying to run XEmacs).
--
Glynn Clements <glynn(a)sensei.co.uk>