ncurses and keycodes
Hi,
There seems to be a difference in the keycodes generated from the "Home" and "End" keys when in Console mode or in X.
I'm using ncurses routine "keypad(stdscr, TRUE)" to get single keycodes back from ncurses instead of escape sequences.
In console mode, with terminal type "Linux", ncurses is returning a single keycode for Home and End, everything's cool. However, in X, with teminal type xterm, it's returning an escape sequence instead of a single keycode. I even tried changing TERM to "linux" with no effect.
Looking at "infocmp xterm", and "infocmp linux" I can see that khome and kend are supposed to be generated when receiving \E[1~ and \E[4~ respectively. Ncurses is sending a different escape sequence in X. I've checked xmodmap but couldn't see anything strange.
Is this a problem in X somewhere? Obviously the termcap entries are working correctly as verified in the console.
This can be fixed in X by altering the termcap entry for xterm with "infocmp" and "tic", but I shouldn't have to do that and it makes for a messy freeware release should I ever get around to doing that.
Redhat 9 straight out of the box running KDE.
Any help greatly appreciated.
Grant.
Last edited by grantm; 07-24-2003 at 12:23 PM.
|