-->
Previous Table of Contents Next


Keyboard Settings

In most installations, the keyboard setting defaults to a U.S. 101-key keyboard with standard key mappings. This will be valid for most computer systems. A few tweaks to the file will help simplify your life, though, so the keyboard section shouldn’t be completely ignored. The following code shows the keyboard section from the FX86Config file:


Section “Keyboard”



    Protocol   “Standard”



# when using XQUEUE, comment out the above line, and uncomment the

# following line



#    Protocol   “Xqueue”



    AutoRepeat   500 5



# Let the server do the NumLock processing. This should only be required

# when using pre-R6 clients

#    ServerNumLock

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))

#    Xleds   1 2 3

# To set the LeftAlt to Meta, RightAlt key to ModeShift,

# RightCtl key to Compose, and ScrollLock key to ModeLock:



#    LeftAlt   Meta

#    RightAlt  ModeShift

#    RightCtl  Compose

#    ScrollLock ModeLock



EndSection

The Protocol should be left as “standard.” The Xqueue line is commented out and should remain that way unless you implement an Xqueue for XFree86. The autorepeat setting tells XFree86 how long to wait for a key to be pressed before generating multiple keystrokes (for example, if you depress the “x” key for more than a certain number of milliseconds, it starts printing multiple x’s).

ServerNumLock controls whether the NumLock key is on or off when XFree86 starts up. The ServerNumLock option is commented out by default in most sample configuration files. If you are running XFree86 version 2.X (or earlier), it is a good idea to uncomment the line. This helps tailor your keyboard for better operation under XFree86. With XFree86 version 3.X, you can leave it commented out because the server will handle the NumLock behavior.

In theory, you can use the Xleds setting to permit programming of the LED buttons on most keyboards (for Num Lock, Caps Lock, and Scroll Lock). Leave it commented as the LEDs are not used for much user feedback.

The rest of the section controls how the Alt, Ctrl, and Shift keys behave. Some UNIX applications expect special keystrokes called “meta” keys, composed of holding a special key while another key is pressed (such as Ctrl+C in DOS or UNIX). These entries let you control which keys are interpreted as Alt, Meta, Control, and ModeLock. Most installations have no problem with all these lines commented out because the number of Linux applications that need special keystrokes is very small (and those are in limited distribution).

You can use XFree86 to translate keystrokes to international characters automatically. In most cases, the keyboard layout is read by XFree86 from the kernel, although you can override this setting. The X11 standards allow only four key tables to be modified, much fewer than Linux.

Mouse Definition

XFree86 uses the mouse heavily, so you must specify the type of mouse on the system and how it is connected. XFree86 supports most popular mouse versions, and any types not directly supported can usually be used in emulation of one of the more popular types such as Microsoft or Logitech. The mouse section of the XF86Config file is labeled as “pointer” (from pointing device) and looks like this:


Section “Pointer”



    Protocol   “Microsoft”

    Device   “/dev/mouse”



# When using XQUEUE, comment out the above two lines, and uncomment

# the following line.



#    Protocol   “Xqueue”



# Baudrate and SampleRate are only for some Logitech mice



#    BaudRate   9600

#    SampleRate   150



# Emulate3Buttons is an option for 2-button Microsoft mice



#    Emulate3Buttons



# ChordMiddle is an option for some 3-button Logitech mice



#    ChordMiddle



EndSection

The Protocol section is the name of the mouse or the emulation to use. The names of supported mouse systems are listed in the Xconfig or XF86Config man page, so if you use a mouse from a vendor other than Microsoft or Logitech, check the man page or other supplied documentation to find the name of the protocol to specify. Another method of identifying the type of mouse is to watch the startup messages when Linux boots: It will often identify the type of mouse.

The Microsoft mouse inevitably uses the Microsoft protocol. Many Logitech mouse devices are Microsoft-compatible, whereas newer versions use the MouseMan protocol. Dexxa and many other mouse device vendors emulate the Microsoft mouse, so the Microsoft protocol can be used.

The Device entry specifies the port the mouse is attached to, using Linux device terminology. In most cases, the entry /dev/mouse is sufficient, as the Linux installation procedure will have configured the mouse already. If you are using a mouse configured on the PS/2 port of IBM PS/2 models, use the PS/2 device driver and not a serial port device driver. Valid device drivers are listed in the man page or the documentation files accompanying XFree86, but most versions support the following devices:

  /dev/mouse: to use the Linux default mouse driver
  /dev/inportbm: Microsoft bus mouse only
  /dev/logibm: Logitech bus mouse only
  /dev/psaux: PS/2 port mouse

A bus mouse requires a specific IRQ to be set in both XFree86 and the kernel. Make sure the IRQ is the same in both places.

As with the keyboard, there is an option for Xqueue users. Because most XFree86 installations don’t use Xqueue, leave this line commented out. The baud rate and sampling rate lines, as the comment indicates, are for some older Logitech mouse devices. Most mouse devices will not need these lines, so keep them commented out. If your mouse does not work without these settings, try 9600 baud, followed by 1200 baud if that doesn’t work. Some earlier versions of XFree86 liked to have a baud rate specified, but try it without an entry first.

The Emulate3Buttons option is useful if you have a two-button mouse. When active, Emulate3Buttons allows you to simulate the press of a middle button by pressing both the left and right mouse buttons simultaneously. Many Linux (and UNIX) applications make use of three buttons on the mouse, so this is a useful option for Microsoft and compatible mouse users.

Finally, the ChordMiddle option is used with some Logitech mouse models. If you use the Logitech driver, try the mouse under XFree86 without this option turned on. If the mouse doesn’t behave properly, try uncommenting this line. Most Logitech mouse devices don’t need ChordMiddle turned on.


Previous Table of Contents Next