--------------------------------------------------------------------------
				   FAQ
--------------------------------------------------------------------------

    Q:	I don't like the screen colours.  How do I change them?

    A:	You can change the screen colours at run-time using command-line
	options or ~/.Xdefaults resources (see the man-page). Alternatively,
	you can change the compile-time default values in "defaults.h"

    Q:	Why doesn't the Backspace key work on my Linux machine?

    A:	The XFree86 server has the notorious problem of mapping the Backspace
	key as Delete in order to match the Linux console.

	The correct way to fix this:

	  0 - Complain to your Linux distributer and the XFree86 team, maybe
	      they'll get it fixed.

	  1 - Use xmodmap to correct the Backspace mapping

		! ~/.Xmodmap

		! a correctly-mapped BackSpace
		keycode 22 = BackSpace

		*** Make sure the keycode above matches the physical
		    Backspace key on your machine!! (use xev) ***

	This will also fix the BackSpace problem with Motif applications,
	such as ``why doesn't Backspace work for Netscape?''

	You should now be able to generate both `^H' and `^?' using with
	BackSpace and Ctrl/Shift-BackSpace.  You can toggle the binding --
	so that BackSpace generates `^?' and Ctrl/Shift-BackSpace generates
	`^H' -- either with a compile-time option `BACKSPACE_AS_DELETE' or
	by using an escape sequence (ESC[36h / ESC[36l) as documented in
	rxvt.ref

	  3 - You may also want to fix the regular xterm if it doesn't
	      generates the desired value for BackSpace

		xterm*vt100.translations: #override \
		<Key>BackSpace: string(\010) \n
	    or
		xterm*vt100.translations: #override \
		<Key>BackSpace: string(\177) \n

	   while you are at it, you may also want to have consistent
	   values to Home/End/Delete

		xterm*vt100.translations: #override \
		<Key>Home:	string("\033[7~") \n\
		<Key>End:	string("\033[8~") \n\
		<Key>Delete:	string("\033[3~") \n

	Finally, you can also remap the rxvt key-binding at run-time -- as
	noted in the following question -- but you'll lose the ability to
	have Ctrl/Shift-Backspace work differently as well as losing the
	escape sequence toggling of Backspace.

    Q:	I don't like the key-bindings.  How do I change them?

    A:	You can define some compile-time key-strings in rxvtkeys.h, and if
	you have compiled with KEYSYM_RESOURCE + FAKE_RESOURCES you can use
	the keysym resource.  Here's an example of what I use for a tn3270
	session started using the option `-name vm'

		!#  ----- special uses ------:
		! vm login, remap function and arrow keys.
		vm*font:	*clean-bold-*-*--15-*

		! keysym - used by rxvt
		! Delete - ^D
		vm*keysym.0xFFFF:	\004

		! Home - ^A
		vm*keysym.0xFF50:	\001
		! Left - ^B
		vm*keysym.0xFF51:	\002
		! Up - ^P
		vm*keysym.0xFF52:	\020
		! Right - ^F
		vm*keysym.0xFF53:	\006
		! Down - ^N
		vm*keysym.0xFF54:	\016
		! End - ^E
		vm*keysym.0xFF57:	\005

		! F1 - F12
		vm*keysym.0xFFBE:	\e1
		vm*keysym.0xFFBF:	\e2
		vm*keysym.0xFFC0:	\e3
		vm*keysym.0xFFC1:	\e4
		vm*keysym.0xFFC2:	\e5
		vm*keysym.0xFFC3:	\e6
		vm*keysym.0xFFC4:	\e7
		vm*keysym.0xFFC5:	\e8
		vm*keysym.0xFFC6:	\e9
		vm*keysym.0xFFC7:	\e0
		vm*keysym.0xFFC8:	\e-
		vm*keysym.0xFFC9:	\e=

		! map Prior/Next to F7/F8
		vm*keysym.0xFF55:	\e7
		vm*keysym.0xFF56:	\e8

    Q:	I'm using keyboard model XXX that has extra Prior/Next/Insert keys.
	How do I make use of them?  For example, the Sun Keyboard type 4
	has the following mappings that rxvt doesn't recognize.

		KP_Insert == Insert
		F22 == Print
		F27 == Home
		F29 == Prior
		F33 == End
		F35 == Next

    A:	Rather having rxvt try to accomodate all the various possible
	keyboard mappings, it is better to use `xmodmap' to remap the keys
	as required for your particular machine.

    Q:	How do I distinguish if I'm running rxvt or a regular xterm?
	I need this to decide about setting colours etc.

    A:	rxvt always exports the variable "COLORTERM", so you can check and
	see it that is set.  Note that several programs, JED, slrn, Midnight
	Commander automatically check this variable to decide whether or not
	to use colour.

	An alternative is to use the patch for the altered ESC-Z answerback
	Courtesy of Chuck Blake <cblake@BBN.COM> with the following shell
	script snippets:

	# Bourne/Korn/POSIX family of shells:
	[ ${TERM:-foo} = foo ] && TERM=xterm # assume an xterm if we don't know
	if [ ${TERM:-foo} = xterm ]; then
	    stty -icanon -echo min 0 time 15 # see if enhanced rxvt or not
	    echo -n '^[Z'
	    read term_id
	    stty icanon echo
	    if [ ""${term_id} = '^[[?1;2C' -a ${DISPLAY:-foo} = foo ]; then
	        echo -n '^[[7n'            # query the rxvt we are in for the DISPLAY string
	        read DISPLAY               # set it in our local shell
	    fi
	fi

	csh/tcsh family of shells:

	if ( !(${?TERM}) ) then          # if term is unset, we are probably in an xterm
	    TERM = xterm
	endif
	if ( ${TERM} =~ xterm ) then
	    stty -icanon -echo min 0 time 15   # see if enhanced rxvt or not
	    echo -n '^[Z'
	    set term_id=$<
	    stty icanon echo
	    if ( ""${term_id} == "^[[?1;2C" && ${?DISPLAY} == 0 ) then
	        echo -n '^[[7n'          # query the rxvt we're in for the DISPLAY string
	        setenv DISPLAY "$<"      # set it in our local shell
	    endif
	endif

    Q:	How do I know which rxvt version I'm using?

    A:	The escape sequence `ESC [ 8 n' works on rxvt version 2.14 and later
	to set the window title to the version number.

    Q:	Aren't there any more Frequently Asked Questions?

    A:	Thankfully, not :)

--
EOF
