On Mon, Sep 01, 2008, Shlomi Fish wrote about "Re: Curses Problem in Detecting Backspace": > > > > It's looks like your BACKSPACE mapped to delete. > I found a workaround for this problem in the code for Curses::UI::Common. > There they have: > > {{{{{{{{{ > $key = KEY_BACKSPACE if ( > ord($key) == 127 or > $key eq "\cH" > ); > }}}}}}}}} > > Having placed that in my code, it seems to work.
I found why your backspace is generating a delete (ASCII 127) character. It appears that Debian, for example, have this policy http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.8 which contains the following dictate which to me looks nothing less than stupid (sorry if this offends anyone): "X translations are set up to make KB_Backspace generate ASCII DEL" "Terminals should have stty erase ^?" This does nothing but complicate everything! You first try very hard for backspace to generate some character which is not backspace, and then try very hard to get all applications to recognize this character as the backspace. All this nonsense makes some sort of historic (or perhaps I better call it pre-historic) sense, but like I said, it is completely uncalled for in modern (read, last 20 years) systems. P.S. As I write this, I notice that also on my system (Fedora 9), if I go to the console (outside X), the backspace key generates ^?, and stty is set for ^? to be the erase key. The horror! What an abomination :( And apparently, it is not only in Debian :( -- Nadav Har'El | Tuesday, Sep 2 2008, 2 Elul 5768 [EMAIL PROTECTED] |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |Entropy: Not just a fad, it's the future! http://nadav.harel.org.il | ================================================================= 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]