Skip site navigation (1)Skip section navigation (2)
Date:      17 Mar 2002 19:27:31 -0800
From:      swear@blarg.net (Gary W. Swearingen)
To:        "Jeff Jeter" <gsfgf@hotmail.com>
Cc:        "FreeBSD Questions" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Xterm doesn't accept special keys
Message-ID:  <x6n0x6a730.0x6@localhost.localdomain>
In-Reply-To: <OE12IUMEjx3y3wdlhcz000029d8@hotmail.com>
References:  <OE12IUMEjx3y3wdlhcz000029d8@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Jeff Jeter" <gsfgf@hotmail.com> writes:

> When i try to use keys other than letters, enter,  and arrows, such as home,
> end, etc xterm just outputs a ~.  When i am not running X these keys work.
> What do i do to enable these keys.  I have tried other terminal emulators
> (in ports) and had the same result.

From my .Xresources (note the comments): 

XTerm*VT100.Translations: #override \n\
       Ctrl <KeyPress>Up: scroll-back(1,line) \n\
     Ctrl <KeyPress>Down: scroll-forw(1,line) \n\
      Shift <KeyPress>Up: scroll-back(1,page) \n\
    Shift <KeyPress>Down: scroll-forw(1,page) \n\
       Meta <KeyPress>Up: scroll-back(1,halfpage) \n\
     Meta <KeyPress>Down: scroll-forw(1,halfpage) \n\
        Shift <Btn1Down>: select-start() \n\
      Shift <Btn1Motion>: select-extend() \n\
          Shift <Btn1Up>: select-end(SECONDARY,CLIPBOARD) \n\
          Shift <Btn2Up>: insert-selection(SECONDARY,CLIPBOARD) \n\
        Shift <Btn3Down>: start-extend() \n\
      Shift <Btn3Motion>: select-extend() \n\
          Shift <Btn3Up>: select-end(SECONDARY,CLIPBOARD)

!        <KeyPress>Insert: string("cd -\n") \n\
!        <KeyPress>Delete: string("\025") \n\
!          <KeyPress>Home: string("cd ") \n\
!           <KeyPress>End: string("savepower") \n\
!         <KeyPress>Prior: string("ps ax\n") \n\
!          <KeyPress>Next: string("ps ax | grep ")

IIRC, defining keys like Home and End this way will cause problems
with terminal programs which expect the normal definitions.  You
might get what you're looking for (but didn't specify) by using
you're shell's features that allow defining keys ("bind" in ksh).

> Also how do i make xterm update whats in the path (so i don't need to open a
> new terminal after installation)?

I don't understand the question, but xterm won't change the PATH
variable.  That can be changed in one of your shell start up scripts.
You CAN tell xterm (with -ls or +ls option) whether to start a shell
login-style if you want to put the setting only in a login shell startup
script.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?x6n0x6a730.0x6>