/usr/X11R6/lib/X11/xinit/xinitrc

#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# start some nice programs

if [ -f $HOME/.Xclients ]; then
    exec $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
    exec /etc/X11/xinit/Xclients
else
       xclock -geometry 50x50-1+1 &
       xterm -geometry 80x50+494+51 &
       xterm -geometry 80x20+494-0 &
       if [ -f /usr/X11R6/bin/arena -a -f /usr/doc/HTML/index.html ]; then
               arena /usr/doc/HTML/index.html &
       fi
       if [ -f /usr/X11R6/bin/fvwm ]; then
               exec fvwm
       else
               exec twm
       fi
fi

 

Modifying Keymaps in X

/usr/X11R6/bin/xmodmap

Convention places xmodmap keymappings in ~/.xmodmaprc

/usr/X11R6/lib/X11/xinit/xinitrc looks for keymappings in ~/.Xmodmap

Examples

 

Keysyms

A complete list of keysym codes can be found in /usr/X11R6/include/X11/keysymdef.h
(here is a portion of that file)

  #define XK_BackSpace            0xFF08  /* back space, back char */
  #define XK_Tab                  0xFF09
  #define XK_Linefeed             0xFF0A  /* Linefeed, LF */
  #define XK_Clear                0xFF0B
  #define XK_Return               0xFF0D  /* Return, enter */
  #define XK_Pause                0xFF13  /* Pause, hold */
  #define XK_Scroll_Lock          0xFF14
  #define XK_Sys_Req              0xFF15
  #define XK_Escape               0xFF1B
  #define XK_Delete               0xFFFF  /* Delete, rubout */

 

Use /usr/X11R6/bin/xev to determine keycodes (keycodes are nonportable)

xev screen capture

 


Last Modified: 14 June 1997

St. Louis Unix Users Group - Linux SIG