In my ncurses text editor, when the user presses Backspace, the program gets the Delete key, and if the user presses Delete, it gets the character 'J'. Does anyone have an idea why?
In my ncurses text editor, when the user presses Backspace, the program gets the Delete key, and if the user presses Delete, it gets the character 'J'. Does anyone have an idea why?
Use the internets, Luke!
Curses Problem in Detecting Backspace
http://www.faqs.org/docs/Linux-mini/...aceDelete.html
Something like that perhaps?
Quzah.
Hope is the first step on the road to disappointment.
stty says that backspace is mapped to 0x08
xev shows that backspace is 0x08 and deleter is 0x7f
That seems right so I still can't find the problem.
Post a small ncurses program to print out BS/Del input.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.