bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with keys


From: galapogos
Subject: Re: Problem with keys
Date: Fri, 2 May 2008 09:10:45 -0700 (PDT)



Mike Gran wrote:
> 
>> Also, I've tested the app on another self compiled Linux
>> kernel(2.6.22.19)
>> with busybox. In this environment, backspace is ASCII value 263, so
>> KEY_BACKSPACE works. However, the "Break" key, as well as Alt-Break,
>> Shift-Break, Ctrl-Break, seems to convert to 2 ASCII characters -  "[P".
>> This doesn't happen in Mandriva. What's wrong here? Why is break an ASCII
>> character when it's clearly not?
> It probably isn't just "[P".  It probably is something like ESC [P. 
> Special 
> keys like BREAK are sent through the terminal as a group of three or four
> ascii 
> characters like "ESC [P", and then getch converts those characters back
> into a KEY_BREAK
> or whatever.  But for getch to work properly, you need to have set an 
> environment variable called TERM correctly.  This somehow allows getch to
> find the 
> appropriate conversion table in the terminal database (termcap/terminfo).  
> 
Thanks. I was wondering if it were a termcap/terminfo problem. I've looked
around the other system and found a termcap file in /etc. What should I do
so that the break key doesn't get translated into the raw ASCII values, i.e.
doesn't show up when isascii() is called on it?
-- 
View this message in context: 
http://www.nabble.com/Problem-with-keys-tp17009973p17022723.html
Sent from the Gnu - Ncurses mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]