On Mon, Sep 01, 2008, Shlomi Fish wrote about "Re: Curses Problem in Detecting 
Backspace":
> On Monday 01 September 2008, Valery Reznic wrote:
> > It's looks like your BACKSPACE mapped to delete.
> >
> 
> OK, but what should I do about it?

This problem has always driven me crazy - not the actual problem, but why
it still exists. After all, look at any keyboard manufactured in the last
two decades - each and every one has separate "backspace" and "delete" keys,
not to mention that most people prefer to use ^C as their delete (SIGINTR)
anyway. Who in their right mind would possibly want their backspace key to
do something strange (like send a weird escape sequence, or interrupt the
current process) while to erase a character they need to press control-H?

But annoyingly, every once in a while I do come across this idiotic (sorry)
problem on actual systems I use.

The first thing you need to check is whether your terminal emulator (xterm,
or whatever you use) sends a backspace (^H, or ASCII 8) when you press the
backspace key. From your post it appears it doesn't, and you need to check
why. Xterm, for example, has the "backarrowKey" property which defaults to
true (backspace), but perhaps your Linux distribution tryed to "improve"
this default and uses something else - try control-left-mouse-button to
see your current settings. Or, if you're using some other terminal emulator
(you probably are, unfortunately xterm has grown out of fashion and replaced
by MS-Windows-lookalikes :( ), look into it's documentation.

Another thing you should check is your tty settings. Run "stty" and see that
your erase = ^H. If erase = ^? then you are actually expecting the backspace
key to send a ^? (delete), so don't be surprised if it does (maybe your
terminal emulator sees this stty setting and generates the character it
expects).

The least likely problem is that somehow your underlying X-Window system is
sending a "delete" character when you're pressing the backspace key - you
can check this with the "xev" tool (X event viewer).


-- 
Nadav Har'El                        |        Tuesday, Sep  2 2008, 2 Elul 5768
[EMAIL PROTECTED]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |If marriage was illegal, only outlaws
http://nadav.harel.org.il           |would have in-laws.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to