changing keyboard behaviour

Gary W. Swearingen garys at
Tue Aug 30 17:59:29 GMT 2005

manish jain <goodredhat at> writes:

> i want my console's delete key to work as forward
> delete and not as backspace. can anyone help me out
> with this small problem ?

Copy one of /usr/share/syscons/keymaps/* to /etc/keymaps,
edit it, and put this in /etc/rc.conf: keymap="/etc/keymap"

Unless you used "console" generically.

> further, when i press the arrow keys in an xterm, it
> echoes wierd characters to the xterm. how can i set
> this right ?

Here's some junk from my .Xresources file (see X manpage)
that might answer your next question too.

XTerm*background: grey80
XTerm*foreground: black
XTerm*font: 10x20
!!  Next resource is ignored if put on VT100 widget only.
!!  But even when set to "xterm", it seems to ignore the xterm entry (with li=65) of /etc/termcap and use 24-lines.
!!  Before adding this 11'jul'01, TERM=xterm (don't know how it got set)  I found this one in "/etc/termcap".
!!XTerm.termName: xterm-xf86-v32  This started causing problems.
XTerm.termName: xterm
!! For wheel-mouse:
!# Scrolling on wheel mouse: half a page normally, line per line with shift
XTerm.vt100.translations: #override\n\

!# In the scrollbar we map buttons 5 & 4 to 1 and 2 otherwise, core dump
!# This will move proportionnaly to cursor position but we dont know how to
!# program the same exact behavior as in the text widget.
XTerm.vt100.Scrollbar.translations: #override\n\
<Btn5Down>: StartScroll(Forward)\n\
<Btn4Down>: StartScroll(Backward)\n
!!  VT100:
!!  89x36 for 1024; 
XTerm*VT100.geometry: 120x54+1+1
XTerm*VT100.cursorColor: Orchid
XTerm*VT100.fullCursor: true
XTerm*VT100.saveLines: 5000
XTerm*VT100.cutNewline: false
XTerm*VT100.jumpScroll: on
XTerm*VT100.scrollBar: on
XTerm*VT100.scrollTtyOutput: off
XTerm*VT100.scrollKey: on
XTerm*VT100.titleBar: false
XTerm*VT100.trimSelection: on
XTerm*VT100.highlightSelection: true
XTerm*VT100.trimSelectiontrimSelection: true
!!  reverseWrap is not an issue when using a fancy command line editing shell, but is good with "sh".
XTerm*VT100.reverseWrap: on
!!  Character (word) class  (I think I like the defaults just fine.)
!XTerm*VT100.charClass: [low-]high:value
!! All non-white, printing chars (same as shorter 33-126:48):
!XTerm*charClass: 33-47:48,58-64:48,91-96:48,123-126:48
!!  "Alternate screen" support on
XTerm*VT100.titeInhibit:  true
XTerm*VT100*loginShell : true

XTerm*VT100.Translations: #override \n\
       Ctrl <KeyPress>Up: scroll-back(1,line) \n\
     Ctrl <KeyPress>Down: scroll-forw(1,line) \n\
     Ctrl <KeyPress>Left: scroll-back(1,halfpage) \n\
    Ctrl <KeyPress>Right: scroll-forw(1,halfpage) \n\
  Ctrl <KeyPress>Page_Up: scroll-back(1,page) \n\
Ctrl <KeyPress>Page_Down: scroll-forw(1,page) \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)

More information about the freebsd-questions mailing list