You are not logged in.

#1 2008-10-06 22:27:27

Honken
Member
Registered: 2007-03-02
Posts: 79

Can't use backspace in ncurses programs without using ctrl

Heya

Anyone know how to use the backspace in ncurses programs without the need to press ctrl? If I don't it just gives me "^?", I've tried setting "urxvt*backarrowKey: false/true" but it doesn't help.

Any help with this annoyance would be appreciated.

Offline

#2 2008-10-07 01:08:34

ljshap
Member
From: Ossining, NY
Registered: 2008-01-23
Posts: 160

Re: Can't use backspace in ncurses programs without using ctrl

Honken wrote:

Heya

Anyone know how to use the backspace in ncurses programs without the need to press ctrl? If I don't it just gives me "^?", I've tried setting "urxvt*backarrowKey: false/true" but it doesn't help.

Any help with this annoyance would be appreciated.

Just for the heck of it, try using the number 127 instead of KEY_BACKSPACE or what ever your'e using in your if statement or select statement.  I would have thought it would be the number 08 which is the ascii code for backspace but that didn't work.  Try it and see if it works.  If it does, I'll let you know what steps I took to try and find it. 
  I used the numbers 13 and 27 in my program instead of KEY_RETURN and KEY_ESC, since neither of those worked.  KEY_RETURN required a <shift><return> to work properly which is similar to your problem.


Live Free or Die !

Offline

#3 2008-10-07 07:27:05

Honken
Member
Registered: 2007-03-02
Posts: 79

Re: Can't use backspace in ncurses programs without using ctrl

Alright, thanks. How would I do that then? I've googled and looked at wikis but I can't seem to find a way to do that. hmm

showkey -a gives me this:
^?    127 0177 0x7f     with a normal backspace
^H       8  0010 0x08   when pressing both control and backspace

So yeah, I'd like to swap them. D:

Last edited by Honken (2008-10-07 07:47:46)

Offline

#4 2008-10-08 12:03:49

Honken
Member
Registered: 2007-03-02
Posts: 79

Re: Can't use backspace in ncurses programs without using ctrl

I hate to do this but, eh, bump.

Offline

#5 2010-08-27 23:41:23

Hoek
Member
Registered: 2010-08-27
Posts: 7

Re: Can't use backspace in ncurses programs without using ctrl

Wow, this is an old thread, but i also discovered this problem upon using an older ncurses app.

Does anyone know whether this is an old ncurses bug/deprecated code/changed API or how to solve this problem?

My $TERM is xterm, i'm using KDE SC 4.5 (kdemod) with konsole as terminal and "infocmp | grep kbs" outputs "kbs=^H". Any ideas?

Last edited by Hoek (2010-08-27 23:41:51)

Offline

#6 2010-08-28 03:24:35

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Can't use backspace in ncurses programs without using ctrl

Hoek, please start your own thread for any issues you might have. Please feel free to reference this thread.

Since Arch is a rolling release, what might have been relevant 2 years ago, would probably not apply anymore.

Closing....


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB