[Top][All Lists]

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

Problem with keys

From: galapogos
Subject: Problem with keys
Date: Fri, 2 May 2008 01:42:01 -0700 (PDT)

I'm building a simple application using ncurses in Mandriva 2008. I have a
simple text user interface asking the user to enter an ASCII string, and
then I'm using wgetch() to parse the string, checking if each character is
an ASCII character using isascii(). I'm also checking for special characters
such as enter and backspace.

I'm using KEY_BACKSPACE to detect for backspace. It's ASCII value seems to
be 263, but when I test my app using Mandriva (Konsole), backspace seems to
be ASCII value 127 instead, so the backspace is never detected. Why is there
a discrepancy between the 2?

Also, I've tested the app on another self compiled Linux kernel(
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?

View this message in context: 
Sent from the Gnu - Ncurses mailing list archive at Nabble.com.

reply via email to

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