xref: /netbsd-src/usr.sbin/wsmoused/wsmoused.conf.5 (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1.\" $NetBSD: wsmoused.conf.5,v 1.8 2004/03/31 11:15:36 jmmv Exp $
2.\"
3.\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Julio M. Merino Vidal.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Neither the name of The NetBSD Foundation nor the names of its
15.\"    contributors may be used to endorse or promote products derived
16.\"    from this software without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd January 5, 2004
31.Dt WSMOUSED.CONF 5
32.Os
33.Sh NAME
34.Nm wsmoused.conf
35.Nd multipurpose mouse daemon configuration
36.Sh SYNOPSIS
37.Nm
38.Sh DESCRIPTION
39The
40.Nm
41file configures all the features provided by the
42.Xr wsmoused 8
43daemon.
44It is composed by a series of
45.Em blocks ,
46each of which defines a group of
47.Em properties .
48The file format is free-form: new line markers are ignored as well as
49indentation.
50Comments start with the
51.Sq #
52sign and extend until the end of line.
53.Pp
54A
55.Em property
56is like a variable assignment.
57It has a name, which goes to the left of the equal sign, and a value,
58which goes to the right.
59The assignment ends with a semicolon.
60It looks like:
61.Pp
62.Dl name = value;
63.Pp
64There is no difference between string or integer values when defining them.
65The value must be surrounded by double quotes if it contains whitespace.
66Booleans are specified as integers, where
67.Sq 0
68means false and
69.Sq 1
70stands for true.
71Even though, the program cares about this and will emit a warning if you
72have done an incorrect assignment.
73Note that it will not accept unrecognized names.
74.Pp
75A
76.Em mode
77is a type of block that defines how the program behaves when run in a
78specific mode.
79A mode inherits properties defined in the global scope.
80It has the following syntax:
81.Bd -literal -offset indent
82mode mode_name {
83        property1 = value1;
84        ...
85        propertyN = valueN;
86}
87.Ed
88.Pp
89There are two recognized modes,
90.Ql action
91and
92.Ql selection .
93.Xr wsmoused 8
94describes what they do in detail.
95.Ss Properties common to all modes
96The following properties can be defined in the global scope, thus
97affecting all modes, or inside the mode definition, to override global
98values.
99.Bl -tag -width indent
100.It device = pathname;
101The
102.Xr wsmouse 4
103device name to use.
104Defaults to
105.Pa /dev/wsmouse .
106.It fifo = pathname;
107Specify an optional fifo where to redirect all mouse events, no matter
108if they have been processed.
109By default, no fifo is used.
110.It modes = string;
111Whitespace separated list of modes to be activated when running.
112Defaults to
113.Sq selection .
114.It nodaemon = boolean;
115Set to 1 to not fork in the background.
116.It pidfile = basename;
117The basename of the pidfile used to control the process.
118Pidfiles are always created under
119.Pa /var/run ,
120and have the
121.Sq .pid
122extension automatically added.
123By default it is set to daemon's program name.
124.It ttystat = pathname;
125.Xr wsdisplay 4 Ns 's
126notification device.
127Defaults to
128.Pa /dev/ttyEstat .
129You will not want to change this.
130.It xconsole = integer;
131Virtual console number which holds the X server (if any).
132The argument specifies the console number (the same found in
133.Pa /dev/ttyE? ) .
134Unset by default.
135.It xconsole_delay = integer;
136Number of seconds to wait before reactivating the mouse when returning
137from the X console (specified by the
138.Sq xconsole
139property).
140Defaults to 5.
141.El
142.Ss Properties specific to the action mode
143The following properties are only useful when running in the
144.Em action
145mode:
146.Bl -tag -width indent
147.It button_<number>_<status> = "command";
148Assigns a command to a button, which will be executed using the
149.Xr system 3
150call.
151The
152.Sq number
153part selects a button to which the command is assigned; the first button
154is numbered
155.Sq 0
156and the maximum depends on the mouse type.
157The
158.Sq status
159part can be either
160.Sq down
161or
162.Sq up ,
163representing the events emitted when the button is pressed and released,
164respectively.
165.El
166.Ss Properties specific to the selection mode
167The following properties are only useful when running in the
168.Em selection
169mode:
170.Bl -tag -width indent
171.It lefthanded = boolean;
172Set to 1 to swap mouse buttons, specially useful for left handed users.
173.It slowdown_x = integer;
174X axis slowdown.
175This positive integer specifies how many events in
176the vertical direction should be ignored before changing the current
177column.
178It defaults to 0.
179.It slowdown_y = integer;
180Y axis slowdown.
181This positive integer specifies how many events in
182the horizontal direction should be ignored before changing the current row.
183It defaults to 3.
184.El
185.Sh FILES
186.Bl -tag -width /usr/share/examples/wsmoused/ -compact
187.It Pa /etc/wsmoused.conf
188Default configuration file.
189.It Pa /usr/share/examples/wsmoused/
190Location of sample files.
191.El
192.Sh SEE ALSO
193.Xr system 3 ,
194.Xr wsdisplay 4 ,
195.Xr wsmouse 4 ,
196.Xr wsmoused 8
197.Sh HISTORY
198The
199.Nm
200configuration file first appeared in
201.Nx 2.0 .
202