The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

bind_parsed_keyseq

#bind_parsed_keyseq($keyseq_list $function, $keyseq_str)

Actually inserts the binding for given $keyseq_list to $function into the keymap object. $keyseq_list is reference an list of character ordinals.

If sequence is more than one element long, all but the last will cause meta maps to be created. The name will be derived from $<keyseq_str>.

$Function will have an implicit F_ prepended to it.

0 is returned if there is no error.

rl_bind_keyseq

rl_bind_keyseq($keyspec, $function)

Bind the key sequence represented by the string keyseq to the function function, beginning in the current keymap. This makes new keymaps as necessary. The return value is non-zero if keyseq is invalid. $keyspec should be the name of key sequence in one of two forms:

Old (GNU readline documented) form:

     M-x        to indicate Meta-x
     C-x        to indicate Ctrl-x
     M-C-x      to indicate Meta-Ctrl-x
     x          simple char x

where x above can be a single character, or the special:

     special    means
     --------   -----
     space      space   ( )
     spc        space   ( )
     tab        tab     (\t)
     del        delete  (0x7f)
     rubout     delete  (0x7f)
     newline    newline (\n)
     lfd        newline (\n)
     ret        return  (\r)
     return     return  (\r)
     escape     escape  (\e)
     esc        escape  (\e)

New form: "chars" (note the required double-quotes)

where each char in the list represents a character in the sequence, except for the special sequences:

          \\C-x         Ctrl-x
          \\M-x         Meta-x
          \\M-C-x       Meta-Ctrl-x
          \\e           escape.
          \\x           x (if not one of the above)

$function should be in the form BeginningOfLine or beginning-of-line.

It is an error for the function to not be known....

As an example, the following lines in .inputrc will bind one's xterm arrow keys:

    "\e[[A": previous-history
    "\e[[B": next-history
    "\e[[C": forward-char
    "\e[[D": backward-char

bind_keys

Accepts an array as pairs ($keyspec, $function, [$keyspec, $function]...). and maps the associated bindings to the current KeyMap.