xref: /netbsd-src/sbin/wsconsctl/wsconsctl.8 (revision 326b2259b73e878289ebd80cd9d20bc5aee35e99)
1.\" $NetBSD: wsconsctl.8,v 1.11 2003/04/05 09:22:22 wiz Exp $
2.\"
3.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Juergen Hannken-Illjes.
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. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"	This product includes software developed by the NetBSD
20.\"	Foundation, Inc. and its contributors.
21.\" 4. Neither the name of The NetBSD Foundation nor the names of its
22.\"    contributors may be used to endorse or promote products derived
23.\"    from this software without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35.\" POSSIBILITY OF SUCH DAMAGE.
36.\"/
37.Dd December 24, 1998
38.Dt WSCONSCTL 8
39.Os
40.Sh NAME
41.Nm wsconsctl
42.Nd get or set wscons state
43.Sh SYNOPSIS
44.Nm
45.Op Fl kdm
46.Op Fl f Ar file
47.Op Fl n
48.Fl a
49.Nm
50.Op Fl kdm
51.Op Fl f Ar file
52.Op Fl n
53.Ar name ...
54.Nm
55.Op Fl kdm
56.Op Fl f Ar file
57.Op Fl n
58.Fl w
59.Ar name Ns Li = Ns Ar value ...
60.Nm
61.Op Fl kdm
62.Op Fl f Ar file
63.Op Fl n
64.Fl w
65.Ar name Ns Li += Ns Ar value ...
66.Sh DESCRIPTION
67The
68.Nm
69command displays or sets various wscons system driver variables.
70If a list of variables is present on the command line, then
71.Nm
72prints the current value of those variables for the specified device.
73.Bl -tag -width Ds
74.It Fl a
75is used to specify all variables for the device.
76.It Fl w
77.Nm
78attempts to set or modify the specified variables to the given values.
79The value can be specified as either an absolute value, by using the
80.Ql =
81symbol
82or as a relative value, by using the
83.Ql +=
84symbol.
85See the
86.Ar EXAMPLES
87section for more details.
88.It Fl f Ar file
89is used to specify an alternative control device.
90.It Fl n
91suppresses the printing of the variable name in the output -
92only the value will appear.
93.It Fl k
94selects the keyboard portion of the device (this is the default).
95.It Fl d
96selects the display portion of the device.
97.It Fl m
98selects the mouse portion of the device.
99.El
100.Pp
101The
102.Nm
103utility can be used to view and modify aspects of the keyboard,
104display and mouse, using the standard, machine-independent
105workstation console device driver
106.Xr wscons 4 .
107.Pp
108The keyboard type can be modified, the keyboard bell's pitch,
109period and duration
110can be modified,
111the
112.Ar typematic
113value can be changed, and the keyboard encoding can be modified
114to switch keys, should the user find a keyboard's default layout
115difficult to use.
116The keyboard types and other relevant definitions
117can all be found in the
118.Pa /usr/include/dev/wscons/wsconsio.h
119file.
120.Pp
121The mouse types are defined in the
122.Pa /usr/include/dev/wscons/wsconsio.h
123file.
124.Pp
125The display types, height, width,
126depth (bits per pixel), color map size, and color map
127are defined in the
128.Pa /usr/include/dev/wscons/wsconsio.h
129file.
130There are also definitions relating to video
131control and cursor control, which are not applicable to
132all display types, and to text emulation and graphics
133(mapped) modes.
134.Pp
135There are currently keyboard encodings for the following
136countries: British, Danish, French, German, Italian, Japanese, Norwegian,
137Spanish, Swedish, US, US-Dvorak, and user-defined.
138.Sh FILES
139.Bl -tag -width /dev/wsmouse0
140.It Pa /dev/wskbd0
141keyboard control device
142.It Pa /dev/wsmouse0
143mouse control device
144.It Pa /dev/ttyE0
145display control device
146.El
147.Sh EXAMPLES
148The following are just a few examples of
149.Nm
150and its functionality.
151.Pp
152.Dl wsconsctl -w encoding=uk
153.Pp
154Sets a UK keyboard encoding.
155.Pp
156.Dl wsconsctl -w map+="keysym Caps_Lock = Control_L"
157.Pp
158Modifies the current keyboard encoding so that when the
159.Ar Caps Lock
160key is pressed, the same encoding sequence as
161.Ar Left Control
162is sent.
163For a full list of keysyms and keycodes, please refer
164to the
165.Pa /usr/include/dev/wscons/wsksymdef.h
166file.
167.Pp
168.Dl wsconsctl -w encoding=us.swapctrlcaps
169.Pp
170Sets a US keyboard encoding, with the
171.Ar Caps Lock
172and
173.Ar Left Control
174keys swapped.
175The
176.Ar .swapctrlcaps
177encoding does not work for all national keyboard encodings.
178For most purposes, the ability to set the value returned
179by the
180.Ar Caps Lock
181key is enough - see the previous example for details.
182.Pp
183.Dl wsconsctl -w bell.pitch=1200
184.Pp
185Sets the bell pitch to be 1200, whilst
186.Pp
187.Dl wsconsctl -w bell.pitch+=200
188.Pp
189Adds 200 to the current pitch of the bell.
190.Sh SEE ALSO
191.Xr pckbd 4 ,
192.Xr wscons 4 ,
193.Xr wsconscfg 8 ,
194.Xr wsfontload 8
195.Sh HISTORY
196The
197.Nm
198command first appeared in
199.Nx 1.4 .
200