TPM(1) Domain/OS BSD TPM(1)
NAME
tpm - set/display touchpad and mouse characteristics
SYNOPSIS
tpm [options]
DESCRIPTION
tpm allows you to define characteristics for the touchpad and mouse. The
touchpad operates in one of three modes: absolute, relative, and
absolute/relative. The mode of operation establishes how movements of
your finger on the touchpad affect the position of the cursor on the
screen. The three modes differ primarily in how the cursor moves when
you lift your finger from the touchpad and then replace it. The mouse
operates in relative mode only, and -s is the only valid option.
The subsections below describe the three operational modes, as well as
the other options.
OPTIONS
If no options are specified, tpm displays the current touchpad
characteristics.
-a (default)
Select absolute mode.
-r Select relative mode.
-ar Select absolute/relative mode.
-rerange Set prescaling factors for touchpad data.
-s x y Set scaling factors for x and y. Values can range from -32768
to 32767. The default scaling factors are 799 for x and 1023
for y (portrait displays); and 1023 for x and 799 for y
(landscape displays).
-o x y Set x and y as the origin for absolute mode. Values must be in
raster units, and can range from 0 to 1023. The default origin
is 0,0.
-h n Set the hysteresis box size. The value must be in raster
units, and can range from 0 to 1023. The default is 5.
DESCRIPTION
Absolute Mode
In absolute mode, using the default scale and origin, the touchpad
approximates the screen, so that the top left edge of the touchpad
represents cursor positions at the top left edge of the screen. Absolute
mode is the default setting. When you place your finger on the touchpad,
the cursor jumps to a corresponding position on the screen. Moving your
finger across the touchpad moves the cursor across the screen in the same
direction.
For example, moving your finger from the top of the touchpad to the
bottom moves the cursor from top to bottom on the screen. If you lift
your finger from the touchpad, and later touch the pad again, the cursor
jumps to a new position on the screen corresponding to the new finger
position.
Absolute mode has no meaning if you are using a mouse.
Relative Mode
In relative mode, cursor movements correspond only to finger movements
across the touchpad. The cursor does not move when you first place your
finger on the touchpad. This differs from absolute mode, where the
cursor jumps to a new position when you lift your finger and then replace
it. In effect, relative mode causes the touchpad to correspond to
different areas of the screen, relative to the current cursor position.
This is the only meaningful mode for a mouse: all movement begins from
the current cursor position.
Relative mode is typically used with scale factors less than the
defaults. Smaller scale factors mean that the touchpad maps to a smaller
area of the screen. For example, scale factors of 200 by 256 specify
one-sixteenth of a portrait display's screen area. With small scale
factors, relative mode allows fine resolution of the cursor position
within a small area.
To reach distant areas on the screen, you can use several strokes on the
touchpad or mouse, each stroke moving the cursor closer to its final
destination. To assist you in making large movements in relative mode
without having to use too many strokes, the speed of cursor movement is
artificially accelerated in relation to the speed of finger or mouse
movement. Thus, a quick motion moves the cursor farther than a slow,
deliberate motion which covers the same distance.
Absolute/Relative Mode
Absolute/relative mode is a combination of absolute and relative modes.
It has no meaning for the mouse. In this mode, the first position of
your finger on the touchpad establishes the first position of the cursor,
as in absolute mode. Moving your finger across the touchpad moves the
cursor across the screen. As in relative mode, the scale is typically
smaller than the whole screen.
Unlike absolute and relative modes, however, the effect of lifting your
finger from the touchpad depends on how long you break contact. If you
lift and replace your finger quickly -- within a half second -- the
cursor does not move, and the effect is the same as relative mode. If
you break contact for more than a half second, however, the cursor jumps
to a new absolute position when you put your finger on the touchpad
again.
Absolute/relative mode is useful for jumping the cursor from one place to
another, then carefully positioning it in the new area. For example,
this mode is commonly used to move the cursor in a jump from one window
to another, and then point to a character in the second window.
Prescaling the Touchpad
Raw touchpad data varies slightly from one touchpad to another.
Prescaling is, in essence, calibration of the touchpad. Every time you
start the node, the touchpad manager prescales the data to determine an
exact range for the device.
To prescale, the touchpad manager observes the first thousand points of
touchpad data (about 30 seconds of use). During this time, you should
try to touch all four edges of the touchpad to ensure that the observed
data constitutes an accurate sample. Based on the observed data, the
touchpad manager computes a prescaling factor which, when applied to the
data, brings all points into the range from -.05 to 1.05. This range
corresponds to the edges of the screen, plus an overlap of 5%, when
multiplied by the default scaling factors. Because of the overlap, you
need not touch the internal frame (under the conductive material) to move
the cursor to the edge of the screen.
The -rerange option invokes prescaling. This option is useful if the
first 30 seconds of use did not include the entire range of the touchpad.
It is also handy if you change keyboards on a node, and therefore need to
reset the prescaling factors without restarting the node.
Scale Factors
The touchpad manager translates, or scales, the data into raster units,
which the Display Manager understands. Scale factors, specified with the
-s option, are applied to the prescaled touchpad data to translate it to
raster units for the Display Manager.
The scale factors are multiplied by the prescaled data. The default
scale factors are 800 for x and 1024 for y (portrait displays); and 1024
for x and 800 for y (landscape displays). Applying these factors to
prescaled data results in numbers from approximately 0 to 799 (for x) and
0 to 1023 (for y) for portrait displays, and vice versa for landscape
displays. (Note that the prescaled data allows a 5% overlap, as
mentioned in the preceding subsection.)
The default scale factors provide for touchpad data corresponding to the
whole screen. Smaller scale factors reduce the area to which the
touchpad maps, thereby allowing you to more finely tune the cursor
position. This also applies to mouse movement, allowing changes in the
apparent motion sensitivity of the device.
Setting the Origin
The origin is the point denoted by the upper left corner of the touchpad,
in absolute and absolute/relative mode. In relative mode, the origin
has no meaning. By default, the touchpad origin corresponds to the upper
left corner of the screen, that is, the point 0,0 in raster units. By
changing the origin, you can use the touchpad (in absolute mode) to
correspond to a portion of the screen.
This feature is useful for applications that need to move the cursor
within a fixed window, rather than across the whole screen. For example,
a program that displays a menu in one window might set the origin to the
upper left corner of the menu window. Consequently, the touchpad maps
onto the menu window instead of the entire screen.
Hysteresis
The hysteresis value defines the dimensions of a box around your finger
position on the touchpad or the current position of the mouse. Movement
within the box does not change the position of the cursor on the screen.
Specify the hysteresis value in raster units. The touchpad manager
compares the value to the difference between the current and previous
finger positions on the touchpad or the current and previous positions of
the mouse. If the difference is less than the hysteresis value, the
cursor does not move. If the difference is greater than the hysteresis
value, the hysteresis value is subtracted from the difference and the
cursor moves the resulting distance. The default hysteresis value is
five.
EXAMPLES
Display current characteristics
$ tpm
Mode: absolute
Xscale: 1024, Yscale: 800
Hysteresis: 5
Origin: 0, 0
Set characteristics to absolute/relative mode with half the default
scaling sensitivity (portrait display).
$ tpm -ar -s 400 512