Im trying to work this code using the the nurses library. I'm trying to make it print the letter i whenever I press the backspace key, but it doesn't seem to be working. It seem pretty simple. It should be working but it isn't. am I missing something? Thanks in advance
#include <ncurses.h>
#include <stdio.h>
int main () {
short ch;
initscr();
keypad(stdscr, TRUE);
clear();
noecho();
ch = getch();
while(ch != '\n') {
if(ch == KEY_BACKSPACE) {
mvaddch(90, 90, 'i');
}
ch = getch();
}
endwin();
}