-->
Previous Table of Contents Next


Configuring the Keyboard Section

The Keyboard section allows you to set up a number of options about your keyboard, which we list in Table 3.8.

Table 3.8 Options in the Keyboard Section
Option Usage

Protocol Standard (the default) or Xqueue
AutoRepeat delay rate Sets up the keyboard auto-repeat delay and rate
ServerNumLock Asks X server to handle NumLock internally
LeftAlt key Overrides default for left Alt key (Meta)
RightAlt key Overrides default for right Alt key (Meta)
ScrollLock key Overrides default for ScrollLock key (Compose)
RightCtl key Overrides default for right Ctrl key (Control)
XLeds Allows programs to use LEDs, rather than keyboard
VTSysReq Uses Alt-SysRq-Fn to switch to virtual terminals
VTInit command Runs command passed to /bin/sh -c, when X server starts up and has opened its virtual terminal

You almost never want to run the Xqueue protocol, which uses a UNIX SVR3 or SVR4 event queue driver. With Linux, skip this option.

With X11 Release 6, X finally handles the NumLock key properly. You probably don’t need to worry about the ServerNumLock protocol unless you have older applications that prove to be a problem.

For the key-mapping overrides, you can set each to one of the following values:

  Compose
  Control
  Meta
  ModeShift
  ModeLock
  ScrollLock

This is probably more than you want to know about your keyboard. See the online-manual page for XF86Config for more information on this.

Virtual Terminals

Linux supports virtual terminals. A virtual terminal is a pseudo-tty UNIX terminal connected to your screen. X uses up one virtual terminal, but you may often have many more.

Each virtual terminal takes over your entire display and presents a traditional UNIX textual terminal, much like what you see when you login. A special key sequence allows you to change between virtual terminals. When you do this, the screen gets cleared and you see the next virtual terminal.

The magic key sequence to change to a virtual terminal is Alt-Fn, where Fn is one of your keyboard’s function keys, such as F1. But watch out: In X, the magic key sequence to change to a virtual terminal is not Alt-Fn, but rather is Ctrl-Alt-Fn. The discrepancy occurs because most window managers capture all Alt-Fn keys.


NOTE:  Most laptops have a special Fn key that’s used to provide a second set of functions to the keyboard function keys. The Fn key on a laptop keyboard should not be confused with the Fn notation used here.

A virtual terminal is not very worthwhile when you have a whole screen with multiple xterm terminal windows. The X environment allows you to use the font of your choice, provides a great many lines, supports a scrollbar, and copies and pastes—none of which the virtual terminals do. So, we only rarely use a virtual terminal.

But there’s one place where a virtual terminal comes in handy: if your X display gets locked up, you can often switch to another virtual terminal and kill off all the X processes.

The VTSysReq option in Table 3.8 allows you to use Alt-SysReq-Fn instead of the default Ctrl-Alt-Fn.

Putting this all together, our Keyboard section follows:


  Section "Keyboard"

      Protocol    "Standard"

  #   Protocol    "Xqueue"

      AutoRepeat  500 5

  #   ServerNumLock

  #   Xleds       1 2 3

      LeftAlt     Meta

      RightAlt    ModeShift

  #   RightCtl    Compose

  #   ScrollLock  ModeLock

  EndSection

Note that we comment out most of it.


Previous Table of Contents Next