Ncurses backspace problem

Hello,

i'm having problem with Ncurses and backspace.

In an input loop, while space cancel a char, backspace doesn't.

1
2
3
4
5
6
if (ch == '\b' || ch == KEY_BACKSPACE) {
            getyx(win, curY, curX);
            if (wmove(win, curY, curX - 1) != ERR) {
                wdelch(win);
            }
        }


What's the problem?
Last edited on
I think you need to call keypad(stdscr, true).
Last edited on
Thank you.

It's already set to true
What is the type of ch? It should be int.
Last edited on
Topic archived. No new replies allowed.