DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Mapping mouse triggers for the Desktop

Modifying the mouse trigger mappings

To change the mouse trigger mapping, perform the following steps.

  1. Open the desired resource file for editing:

  2. Redefine the trigger mapping, using this syntax:

    trigger [ : modifiers ] [ / context ] = {trigger_name | action}

    where modifiers can be c, s, l, or m1 - m5 and context can be b, p, or t. When you are finished, save your changes and exit the resource file.

  3. Restart the Desktop.

Step 1: Editing the resource file

You can change the default trigger mappings so that all users on your system use the new definitions, or you can simply change the mappings for an individual user.


NOTE: Changing the trigger mappings should not be taken lightly. The trigger mapping is optimized to the particular mouse supplied with your system. Furthermore, the mouse trigger mappings are currently defined so that they are OSF/Motif compliant. Altering these trigger mappings will alter this compliance.

The default trigger mappings are defined in /usr/lib/X11/app-defaults/XDesktop3. You must have root privileges to edit this file. It is good practice to make a backup copy of the file before making changes to it.

Individual users can also change the mouse trigger mappings for their own use by copying the trigger mapping section from /usr/lib/X11/app-defaults/XDesktop3 to a file called $HOME/XDesktop3. This file is used to specify personal resource specifications that are used by the Desktop. Unlike the $HOME/.Xdefaults-hostname file (used for many resource specifications), which is specific to a given host machine, the Desktop consults $HOME/XDesktop3 on any host.


NOTE: The XDesktop3 file does not exist in the user's home directory by default. If this file is not currently present, you must create it before you can redefine the trigger mappings.

If you create this file for a user from the root account, you must assign the file the correct ownership permissions. Run the chown command to assign the correct owner and the chgrp command to assign the correct group to the XDesktop3 file. If you created this file yourself, these steps are unnecessary.


When the Desktop starts, it checks to see if an XDesktop3 file exists in $HOME. If such a file does exist, the resource values specified in the user resource file take precedence over any values assigned to the same resource for the system, or in the resource database.

See also:

Step 2: Redefining the trigger mapping

Type the new trigger mapping using the syntax described below. The entry must begin with the resource *triggers*mapping and each trigger string must be followed by a semicolon, ``;''. The mapping may span multiple lines if all but the last line ends with a backslash, ``\''.

The syntax for a trigger mapping string is:

trigger [ : modifiers ] [ / context ] = {trigger_name | action}

where modifiers can be c, s, l, or m1 - m5 and context can be b, p, or t.

Here are the meanings of the various flags and the other arguments:

Menu actions

Use a menu action if you want a menu to be displayed when a hold trigger occurs. Specify a menu action with m menuname.

For example, this action displays the Desktop Help menu, defined by the ``DesktopHelpMenu'' rule, when a hold trigger occurs:

   m DesktopHelpMenu

Rename actions

Use a rename action to invoke a rename command. A rename action takes no argument, but the trigger must occur on an icon and the last step must be a click:

   r

Selection actions

Use a selection action to select one or more icons. If the pointer is in a directory window, the main Desktop, or another desktop window, and not on an icon, the action affects all icons in the window.

Specify the type of selection using:

Sequence Meaning
!s or !rs select icon(s) and unselect any previous selections
+s or +rs select icons(s) and add to previous selection list
-s or -rs unselect icon(s) from previous selection list
~s or ~rs toggle select/unselect
Use the rs sequences to specify that the icon selections are to be made with a rectangle that the user drags from the point of origin to surround the selected icons.

For example, this action specification lets the user select one or more icons with a rubber-band selection rectangle, then unselects any previously selected icons:

   1/b:bpt=!rs

See also:

Step 3: Restarting the Desktop

Once you have made the desired resource changes, you need to restart the Desktop so the newly defined values will be read. Select Restart Desktop Session from the main Desktop File menu. You are prompted to confirm that you want to restart the Desktop by a dialog box; click on Yes.

The Desktop starts again and reads your new resource values.


Previous topic: Mapping mouse triggers for the Desktop

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