I have a curses application ( WordGrinder ). I just had an error report from a user who said that some keys do not work properly on his keyboard. In the case, he is right.
Key issues are the SHIFT + cursor keys and some keyboard navigation keys such as END. Examining what happens, it seems that the curses do not send me events for these keys. In the case of the SHIFT + cursor keys, I get nothing, and for END I get the original escape sequence.
It surprises me. All other keys are interpreted and translated correctly into keysyms. I expect to receive KEY_SLEFTand KEY_END. Why am I not?
I looked at some other applications where these keys work, but I don’t see anything obvious that I am doing wrong; and applications like nano really do evil things, such as handling their own parsing, so I don't know if they are a good candidate for source code.
I initialize ncurses as follows:
initscr();
raw();
noecho();
meta(NULL, TRUE);
nonl();
idlok(stdscr, TRUE);
idcok(stdscr, TRUE);
scrollok(stdscr, FALSE);
intrflush(stdscr, FALSE);
keypad(stdscr, TRUE);
I use gnome-terminal as a terminal emulator, and xterm as a terminal type. The language is UTF-8, and I have the ncursesw version of the library.
Any ideas?
Update:
, Wordgrinder gnome- Gnome 3 , ncurses. , SHIFT + LEFT 393. xterm . , CTRL + LEFT 539, Curses , KEY_MIN KEY_MAX --- 257 511...
, , , ? -? , , .