DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring window manager key bindings

Example of configuring key bindings

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

The following example assumes that you are using the default pmwm mode of the window manager, that you want to create a new key binding set for your local environment, and you want to name the set ``MyKeyBindings''. MyKeyBindings consists of four key binding definitions that produce the following results:

To create this new set:

  1. Open the .pmwmrc file in your $HOME directory for editing. (If .pmwmrc does not already exist, create it by copying /usr/lib/X11/system.pmwmrc to .pmwmrc in your $HOME directory.)

  2. Locate the ``DefaultKeyBindings'' section in the .pmwmrc file and place a copy of the section underneath the default definitions. You can use this copy as a template for your new key binding set.

  3. Rename ``DefaultKeyBindings'' to ``MyKeyBindings''.

  4. Edit the template so that it looks like this:
        1   #
        2   # key binding descriptions
        3   #
        4   Keys  MyKeyBindings
        5   {
        6       Shift<Key>Escape      icon|window          f.post_wmenu
        7       Ctrl<Key>space        icon|window|root     f.menu MyRootMenu
        8       Alt<Key>Escape        icon|window|root     f.next_key
        9       Alt Shift<Key>Escape  icon|window|root     f.prev_key
       10   }
    

  5. Define the keyBindings resource to announce the new key binding set to the window manager. Specify the resource in the $HOME/.Xdefaults-hostname file, where hostname is the name of the host, or machine, where the window manager is running. The resource specification should look like this:

    Pmwm*keyBindings: MyKeyBindings

  6. Restart the window manager so that the new key binding information is implemented.

Previous topic: Step 5: Restarting the window manager

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