Curses::UI::Widget - binding function keys

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default Curses::UI::Widget - binding function keys

    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>
    Mumia W. Guest

  2. Similar Questions and Discussions

    1. Determining all shortcut keys in use (including Function keys)?
      I'm creating a Windows Acrobat 8 plug-in and would like to know how to find all the current shortcut keys. The Acrobat 8 SDK's Developing Plug-ins...
    2. xterm function keys
      To all who have a clue I would like to hack xterm to provide different function key mappings. so far I have altered the decfuncvalue function...
    3. Listening for Function keys pressed
      Hi all, I'm hoping that I am in the right spot for this query, and that someone can help. I'm very new to flash (Flash MX 2004) and am attempting...
    4. value binding and function binding
      Hi I was just wandering through some lisp code and I saw this: (let ((x 1)) (flet ((x (y) (+ x y))) (x x))) (I'm not sure if the indentation...
    5. Function keys to post a form
      Hi all, I have disabled the function keys (F1-F12). I would like each funtion key to submit a form. I'm not quite sure how to tell each...
  3. #2

    Default Re: Curses::UI::Widget - binding function keys

    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>

    Mumia W. Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139