Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Common Desktop Environment: Advanced User's and System Administrator's Guide > Chapter 14 Customizing the Workspace Manager

Customizing Key Bindings

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

A keyboard binding, also known as a key binding, associates combination of keys with Workspace Manager functions. Key bindings apply to all workspaces.

NOTE: Be careful about using a common key combination as a keyboard binding. For example, Shift-A normally puts the letter "A" into your current window. If you bind Shift-A to a function, you lose its normal usage.

Default Desktop Key Bindings

The desktop default key bindings are defined in the Workspace Manager configuration file in a key binding set named DtKeyBindings:

Keys DtKeyBindings
{
...
}

Key Binding Syntax

The syntax for key bindings is:

Keys KeyBindingSetName
{
[Modifiers]<Key>key_name context function [argument]
[Modifiers]<Key>key_name context function [argument]
...
}

where:

Modifiers

Ctrl, Shift. Alt, and Lock. Multiple modifiers are allowed; separate them with spaces.

key_name

The key to which the function is mapped. For keys with letters or numbers, the key_name name is usually printed on the key. For instance the name of the "a" key is "a", and the "2" key is named "2". The "Tab" key is named "Tab". The "F3" key is named "F3".

For other keys, the name is spelled out—for example, plus for the "+" key. The file keysymdef.h, located in a system-dependent directory, contains additional information about key names.

context

The element that must have the keyboard focus for this action to be effective. These can be concatenated together if the binding applies to more than one context. Multiple contexts are separated by the "|" character.
root—Workspace backdrop
window—Client window
icon—Icon

function

A window manager function. Refer to the dtwmrc(4) man page for a list of valid functions.

argument

Any window manager function arguments that are required. Refer to the dtwmrc(4) man page for details.

For example, the following key binding lets the user to switch the keyboard focus to the next transient window in an application by pressing Alt+F6.

Alt<Key>F6    window    f.next_key    transient
NOTE: For complete information on key binding syntax, see the dtwmrc(4) man page.

To Create a Custom Key Binding Set

  1. Open the appropriate file for editing:

  2. Create a new key binding set with a unique KeyBindingSetName. Use the desktop default key binding set, DtKeyBindings, as a guide.

  3. Set the keyBindings resource to the new set name:

    Dtwm*keyBindings: KeyBindingSetName
  4. Choose Restart Workspace Manager from the Workspace menu.

NOTE: The new key bindings replace your existing key bindings. Copy any key bindings you want to keep from DtKeyBindings into your new set.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.