bug-ncurses
[Top][All Lists]
Advanced

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

Re: keyname


From: Thomas Dickey
Subject: Re: keyname
Date: Mon, 5 Sep 2005 07:11:59 -0400 (EDT)

On Mon, 5 Sep 2005, willett wrote:

I'm enjoying using ncurses, which work great.  Question/bug report follows.

Am I understanding function keyname correctly?

It returns the internal variable name as a string. That is, a program calling
 keyname(KEY_F1)

will return the string
 "KEY_F(1)"

But to be useful for a program presenting key prompts to a user,
the programmer would want this function to return a string like "F1".

It is a little odd, but that's what other implementations do.
It's the same as the definition from curses.h would be.

I've written a routine to clean up the returned key labels, but I was
wondering if there's another ncurses function I'm missing, or if
this is the intended behavior, or I this might get changed in the
future.

no, it's intended behavior

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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