The usemouse command merges data from a mouse
into the input stream of a tty. The mouse data is
translated to arrow keys or any other arbitrary
ASCII strings. Mouse movements up, down, left,
right, up-left, up-right, down-left, and down-right, as
well as individual up and down button transitions, are
programmable. This permits the mouse to be used with
programs that are not designed to accept mouse input.
usemouse with no arguments sets the mouse for use
with the default map /etc/default/usemouse. A
new shell is invoked. To terminate usemouse,
exit the shell with <Ctrl>d.
Alternate map files can be found in the directory
/usr/lib/mouse. Users can create their own map
files based on the default file. Quoted strings may be
used in a map file, as well as the octal sequences found in
manual page. Map files can be located anywhere on the
system and accessed with the -f option (see
The default map file has the following values:
vi top of file (1G) command
vi delete character (x) command
vi bottom of file (G) command
Up arrow key
Down arrow key
Left arrow key
Right arrow key
Up and Left
Up and Right
Down and Left
Down and Right
usemouse takes the following options:
Suppress bell (<Ctrl>g)
for the duration of mouse usage.
Run cmd with usemouse. cmd
defaults to the shell specified in the SHELL
environment variable. If SHELL is unspecified,
/bin/sh is used. Note that the command given with
this flag can contain blank spaces if the entire command is
placed within double quotes. For example:
usemouse -c "vi /etc/termcap"
is valid. When cmd terminates,
usemouse terminates as well.
Select an alternate configuration file,
conffile. conffile should use the
format of /etc/default/usemouse.
Define the horizontal sensitivity. Horizontal mouse
movements smaller than this threshold are ignored. Mouse
movements that are multiples of this value generate
multiple strings. The sensitivity defaults to 5 units.
The minimum value is 1 unit, and the maximum is 100 units.
The lower the value, the more sensitive your mouse is to
motion. Note that setting a high value may cause your
mouse to behave as though it is not functioning, due to the
large motion required to generate a signal.
Select a predefined configuration file. type can
be any file in /usr/lib/mouse, such as
vi, or rogue. These files are
identical in format to /etc/default/usemouse.
The vi-specific map maps the traditional h-j-k-l
direction keys to the mouse movements. The terminal bell
is automatically silenced by the vi map entry
bells=no. This is done to prevent the bell being
activated continuously when the user generates a spurious
command with the mouse.
Define the vertical sensitivity. Vertical mouse movements
smaller than this threshold are ignored. Mouse movements
that are multiples of this value generate multiple
strings. The sensitivity defaults to 5 units. The minimum
value is 1 unit, and the maximum is 100 units. The lower
the value, the more sensitive your mouse is to motion.
Note that setting a high value may cause your mouse to
behave as though it is not functioning, due to the large
motion required to generate a signal.
The parameters are name=value
pairs indicating what ASCII string to insert into
the tty input stream when the given event is received.
Valid parameters include:
String to generate on right button up.
String to generate on right button down.
String to generate on middle button up.
String to generate on middle button down.
String to generate on left button up.
String to generate on left button down.
String to generate on mouse right.
String to generate on mouse left.
String to generate on mouse up.
String to generate on mouse down.
String to generate on mouse up-left.
String to generate on mouse up-right.
String to generate on mouse down-right.
String to generate on mouse down-left.
Sensitivity to horizontal motion.
Sensitivity to vertical motion.
Whether to remove <Ctrl>g characters.
Parameters may be specified in any order. They may contain
octal escapes. They should be quoted with single or double
quotes if they contain blank spaces. Any parameter may be
omitted; its value is then taken from the configuration