IUBio

tcsh and SUN

Dan Davison Davison at UH.EDU
Wed Jun 2 09:42:33 EST 1993


Stephen Baird said:
> I now use it all the time, but on the SUN itself in the "cmdtool"
> window, the curser keys don't work and give me the previous commands.
> Is this a termcap problem or does tcsh only capture the key commands
> on simpler terminals?


I use tcsh in cmdtools all the time; but I never have used the arrow
keys. I do "set edit" and use emacs key bindings to get scroll and
edit -- vi bindings are also possible. Make sure your "num lock" key
isn't on.  


If you want vi or to make your arrow keys work in a cmdtool, look at
the tcsh man page under "bindkey":

Syntax: bindkey [ -a ] [ -c ] [ -s ] [ -v ] [ -e ] [ -d ]  [
                 -l ] [ -r ] [ -- ] [ in-string [ out-string | command ]]
 
     If no values are given all bindings are listed. If only  in-
     string is given, bindings for the in-string is listed.
 
     Otherwise it binds the in-string to the given out-string  or
     command.   If  out-string,  this is treated as input to tcsh
     when in-string is typed. This may  be  used  recursively  to
     currently a level of 10 deep.
 
     There are two basic key maps:  the  normal  and  alternative
     one.  The alternative is used by VI command mode. For multi-
     character input the basic  key  maps  contains  a  sequence-
     lead-in for the first character in the input.
 
     Options:
         -a    bind in-string in alternative key map.
         -s    bind an out-string instead of a command
         -c    bind a unix command instead of a command
         -v    bind for default VI-mode
         -e    bind for default emacs-mode
        -d    bind to compiled in default
         -l    list functions available with short description
         -r    remove the binding of in-string
 
     In strings control  characters  may  be  written  as  caret-
     <letter>  and  backslash ("\") is used to escape a character
     as follows:
          \a   bell character
          \n   line feed (new line)
          \b   back space
          \t   horizontal tab
          \v   vertical tab
          \f   form feed
          \r   carriage return
          \e   escape
          \nnn character code in octal
     In all other cases \ escapes the following character. Needed
     for  escaping  the  special  meaning  of \ and ^.  Delete is
     written as "^?" (caret-question mark).
 
     Tcsh always binds the arrow keys as defined by  the  termcap
     entry to:
           up arrow       up-history
           down arrow     down-history
           right arrow    forward-char
           left arrow     backward-char
 
     except where these bindings would alter other single charac-
     ter  bindings.   If  this  is  not desired one can avoid the
 
Cornell           Last change: 19 December 1991                 3
 
TCSH(1)                  USER COMMANDS                    TCSH(1)
 
     automatic arrow key binding using settc to change the  arrow
     key  escape  sequences  to the empty string.  The ansi/vt100
     sequences for arrow keys are always bound.
 
Note the "except where these bindings would alter other single
character bindings".  Since cmdtool puts out its own inimitable
strings for arrow-key bindings, you need to redefine things using
bindkey.


dan

-- 
dr. dan davison/dept. of biochemical and biophysical sciences/univ. of
Houston/4800 Calhoun/Houston,TX 77204-5934/davison at uh.edu/DAVISON at UHOU

"Without the voice of reason, every faith is its own curse" -- Sting

Disclaimer: As always, I speak only for myself, and, usually, only to
myself.




More information about the Info-gcg mailing list

Send comments to us at biosci-help [At] net.bio.net