The xmodmap utility can be used to change mouse button mappings. The syntax for changing mouse button mappings with xmodmap is:

xmodmap {-e "pointer = {default number [number...] }" -pp}

-e

Specifies a remapping expression. Valid expressions are covered in "Customizing Keyboard Input".

default

Set mouse keys back to default bindings. number

Specifies a list of button numbers to map the mouse keys to. The order of the numbers refers to the original button mapping.

pp

Print the current pointer mapping.

For example, to reverse the positions of buttons 1 and 3 for left-handed mapping:

xmodmap e "pointer = 3 2

1"

(2 button mouse)

xmodmap e "pointer = 3 2

1 5 4"

(3 button mouse)

To establish OSF/Motif-standard button mapping:

xmodmap e "pointer = 1 3

2"

2 button mouse

xmodmap e "pointer = 1 3

2 4 5"

3 button mouse

Going Mouseless with the X*pointerkeys File

Your work situation may lack sufficient desk space to adequately use a mouse pointer. You may, therefore, want to "go mouseless" by naming the keyboard (or some other input device) as the pointer.

To go mouseless, you need to have the proper configuration specified in the X*devices file and to have a special configuration file named X*pointerkeys. The default X*pointerkeys file is X0pointerkeys in /usr/lib/X11.

Page 89

Graphics Administration Guide for HP-UX 10.20