DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring the keyboard for the server

Example of configuring the keyboard

This section provides a comprehensive example that ties together many of the concepts and procedures discussed in this chapter.

For the purposes of this example, let's assume you are accustomed to working from a terminal on which the left <Ctrl> key is directly above the left <Shift> key. However, you run your system from the console of a machine on which the <CapsLock> key is located where you expect the <Ctrl> key, and the <Ctrl> key is where you expect to find the <CapsLock> key. This example explains how you swap the function of these two keys.

  1. Log in to the system. If logging in does not automatically start a Graphical Environment session, do so now by entering the following command at the prompt:

    startx &

  2. Start a scoterm window and run the following command:

    xmodmap -pk | grep Caps_Lock

    This displays the keycode(s) to which the Caps_Lock keysym is attached. The output is similar to the following:

       65         0xffe5 (Caps_Lock)
    

  3. To display the keycode(s) to which the Control_L keysym is attached, type the following command:

    xmodmap -pk | grep Control_L

    The output is similar to the following:

       36         0xffe3 (Control_L)
    

  4. Attach the Control_L keysym to the keycode to which the Caps_Lock keysym is assigned with the following command:

    xmodmap -e "keysym Caps_Lock = Control_L"

  5. Now check the keymap table with the following command:

    xmodmap -pk | grep Control_L

    The output indicates that the Control_L keysym is now attached to the keycode to which the Caps_Lock keysym was attached. The output is similar to the following:

       36         0xffe3 (Control_L)
       65         0xffe3 (Control_L)
    
    Note that you now need to attach the Caps_Lock keysym to the keycode to which the Control_L keysym was originally attached, which in this case is keycode 36.

  6. Attach the Caps_Lock keysym to the keycode 36 with the following command:

    xmodmap -e "keycode 36 = Caps_Lock"

  7. Verify that the Caps_Lock keysym has been mapped to the <Ctrl> key successfully with the following command:

    xmodmap -pk | grep Caps_Lock

    The output should show the Caps_Lock keysym attached to the keycode to which the Control_L keysym was originally attached. The output should be similar to the following:

       36         0xffe5 (Caps_Lock)
    

  8. Verify that the Control_L keysym has been mapped to the <CapsLock> key successfully with the following command:

    xmodmap -pk | grep Control_L

    The output should show the Control_L keysym attached to the keycode to which the Caps_Lock keysym was originally attached. The output should be similar to the following:

       65         0xffe3 (Control_L)
    

  9. Test the new keyboard configuration.

Previous topic: Step 2: Specifying keymap table changes

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003