BINDKEY(1)                                                          BINDKEY(1)


NAME
     bindkey - function key binding facility for use with xwsh(1G)

SYNOPSIS
     bindkey [ -r key[,binding] ... ]
     bindkey [ -l key[,binding] ... ]

DESCRIPTION
     bindkey is a program which provides an interface to the xwsh(1G) function
     key binding facilities.

     key is the name of a key on the keyboard; type bindkey without arguments
     to obtain a list of valid keys.  The following are valid bindkey keys:

     f1   f2   f3   f4   f5   f6
     f7   f8   f9   f10  f11  f12
     print-scrn     scroll-lock    pause
     insert    home page-up
     end  page-down left-arrow
     up-arrow  down-arrow     right-arrow


     binding is the text string which the key is bound to.  The text of the
     binding argument must be in the printable character set.  Using the "\"
     character, other character codes can be made a part of the binding.  The
     following backslash sequences are supported: \n, \r, \t, \b, \\, and \xxx
     where xxx is an octal number.

     It is important to remember that the binding text is interpreted by the
     shell you are using before it is passed to bindkey on the command line
     (this usually means that extra \s are required).  For remote bindings,
     the text is interpreted a second time when the key bound to the text is
     pressed and then interpreted by the application currently reading tty
     input.  See the csh(1) and sh(1) man pages for rules concerning escape
     sequences for special characters, such as newline (\n).

     The -r option binds the text string to the given key.  When the key is
     pressed, the data is sent to the process that xwsh is managing (such as
     the shell).

     The -l option performs the same binding as -r, except that the text
     string defines a function internal to xwsh.  When the key is pressed, the
     local binding is executed by xwsh directly, and not passed on to the
     program that xwsh is managing.

     The set of local xwsh functions and their keywords are listed below.

     down-line   scroll the view one line, as if the down arrow button on the
                 scroll bar was clicked.


     down-page   scroll the view down one page, as if the up arrow button on
                 the scroll bar was clicked while the Shift key was pressed.

     end         scroll the view to the bottom of the xwsh contents, as if the
                 scroll bar was clicked at the bottom.

     home        scroll the view to the top of the xwsh contents, as if the
                 scroll bar was clicked at the top.

     pop         pop the window to the front.

     push        push the window to the back.

     send        send the contents of the cut buffer to the process that xwsh
                 is managing.  The data is sent as if the user typed it.

     toggle-redirect
                 Toggle the output redirect (only valid when xwsh is run with
                 the -R option).  If the xwsh output was redirected to the
                 secondary device, the output is redirected back to the xwsh
                 window.  If the output was directed to the xwsh window,
                 redirect it to the secondary device.

     up-line     scroll the view one line, as if the up arrow button on the
                 scroll bar was clicked.

     up-page     scroll the view up one page, as if the up arrow button on the
                 scroll bar was clicked while the Shift key was pressed.

     xwsh has the following default local bindings (see above):

          The f4 key is bound to the local send function.

          The home key is bound to the local home function.

          The end key is bound to the local end function.

          The page-up key is bound to the local up-page function.

          The page-down key is bound to the local down-page function.

     If no binding is provided, then bindkey will restore the key to its
     default global binding.

EXAMPLES
     The following example of remote binding performs the command `ls -l' when
     the F1 key is pressed:

          bindkey -r f1,'ls -l\n'

     The following example of local binding scrolls the xwsh display up one
     line when the up-arrow on the cursor control pad is pressed.


         bindkey -l up-arrow,up-line

     The following example reverts the binding on the F1 function key to the
     system default:

          bindkey -r f1


WARNING
     bindkey provides a restricted interface which will be adjusted when the
     underlying key binding facility is completed.


NOTE
     By default, xwsh key binding is disabled. See the description of the
     -bindkey2dcs option in the xwsh man page.

BUGS
     There is currently no way to query a binding.  There is no information
     around that describes what the "original default global bindings" are.

SEE ALSO
     xwsh (1G), sh (1), csh (1)


                                                                        Page 3