Click here to get back home

Curses::UI::Widget - binding function keys

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Curses::UI::Widget - binding function keys Mumia W. 07-18-2006
Posted by Mumia W. on July 18, 2006, 1:53 am
Please log in for more thread options


I read the documentation for Curses::UI::Widget on how to bind
control-keys to perl subs. Very nice. However, there are no
instructions on how to bind function keys to perl subs in
Curses::UI::*.

I'm not a newbie, and it took me an hour to find the
information in "perldoc Curses." And even then, that page is
geared toward people who've used curses before. Nothing on
that page, or any document in Curses::* that I've found,
explains how to bind function keys. Fortunately for me, I
figured it out when I saw KEY_F in the list of supported
functions in "perldoc Curses." Whereas it took me an hour to
find it, it would take a newbie a day.

This text should be added to the documentation for
Curses::UI::Widget:

<quote>
The keys recognized by this module are controlled by the
Curses module. Read "perldoc Curses" for more information. You
can bind function keys such as F1 using something like this:
"$cui->set_binding(\&mysub, KEY_F(1));"
</quote>

Posted by Mumia W. on July 18, 2006, 3:35 am
Please log in for more thread options


On 07/18/2006 12:53 AM, Mumia W. wrote:
> [...]
> This text should be added to the documentation for Curses::UI::Widget:
>
> <quote>
> The keys recognized by this module are controlled by the Curses module.
> Read "perldoc Curses" for more information. You can bind function keys
> such as F1 using something like this: "$cui->set_binding(\&mysub,
> KEY_F(1));"
> </quote>

Rehash:
<quote>
The keys recognized by this module are controlled by the
Curses module. Read "perldoc Curses" for more information. You
can bind function keys such as F1 using something like this:

use Curses;
use Curses::UI;
my $cui = new Curses::UI;
$cui->set_binding(\&mysub, KEY_F(1));
sub mysub { }

</quote>


Similar ThreadsPosted
Broken bulkwalk in Net-snmp perl binding October 1, 2006, 11:09 am
sql mega-widget March 16, 2005, 11:39 am
Mega-Widget with two entry's and two variables March 10, 2005, 2:22 pm
Zertifikate/Keys September 17, 2007, 4:16 am
perl : Importing registry keys February 3, 2005, 11:34 am
Return keys from $db->DataHash directly into an array September 16, 2007, 11:56 am
Will XML::Simple work with keys, strings, integers, and dates? March 21, 2005, 10:43 am
$db->DataHash does not return keys/fields in same order as they appear in database September 16, 2007, 11:59 am
Modules for hash functions? (ie, common algorithms for computing hash keys, not manipulating perl hashes) August 26, 2006, 7:08 pm
CDK vs Curses::UI April 15, 2005, 11:12 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap