|
|
To change the mouse trigger mapping, perform the following steps.
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.
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.
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.
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:
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:
For example, a double-click of mouse button 1 is represented by:
1,1A chording of mouse buttons 1 and 3 (pressing both buttons simultaneously) is represented by:
13When a step includes more than one button, the step ends when all buttons are released; the order in which the buttons are pressed does not matter.
If a trigger contains more than five steps, it is ignored.
The modifiers are:
Character | Meaning |
---|---|
c | <Ctrl> key |
s | <Shift> key |
l | <CapsLock> key |
m1-m5 | system-defined modifiers |
Character | Meaning |
---|---|
\~ | specified modifier keys must not be pressed |
! | specified modifier keys must be pressed and other modifier keys may not be pressed |
2:~slSpecify a press of mouse button 1 in which the <Ctrl> key must be pressed and no other modifier key may be pressed with this modifier:
1:!c
The context specifications are:
Character | Meaning |
---|---|
b | directory, desktop, or treeview window background |
p | icon picture |
t | icon title (name) |
2/pt
For more information on the trigger_action and drop_in_action clauses, see the xdt3(XC) manual page. For more information on using Deskshell commands, see ``Writing Deskshell commands''.
The trigger_name can be one of the following one-letter identifiers, which specify the type of button press in the trigger:
Character | Meaning |
---|---|
s | static trigger (implies a single- or double-click) |
d | dynamic trigger (implies drag) |
h | hold trigger |
For example, this trigger_name assigns the identifier h3 when button 3 is pressed on an icon picture or title (name):
3/pt=h3This trigger_name assigns the name deselect to a press of mouse button 1 on a desktop or directory window background:
1/b=s deselect
An action includes a one-letter identifier to specify the type of action:
Character | Meaning |
---|---|
m | menu |
r | rename |
s | selection |
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
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
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 |
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:
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.