xref: /netbsd-src/sbin/wsconsctl/wsconsctl.8 (revision 9fd8799cb5ceb66c69f2eb1a6d26a1d587ba1f1e)
1.\" $NetBSD: wsconsctl.8,v 1.30 2020/07/13 11:14:12 nia Exp $
2.\"
3.\" Copyright (c) 1998, 2004 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.\"
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 July 13, 2020
31.Dt WSCONSCTL 8
32.Os
33.Sh NAME
34.Nm wsconsctl
35.Nd get or set wscons state
36.Sh SYNOPSIS
37.Nm
38.Op Fl dkmn
39.Op Fl f Ar file
40.Fl a
41.Nm
42.Op Fl dkmn
43.Op Fl f Ar file
44.Ar name ...
45.Nm
46.Op Fl dkmn
47.Op Fl f Ar file
48.Fl w
49.Ar name Ns Li = Ns Ar value ...
50.Nm
51.Op Fl dkmn
52.Op Fl f Ar file
53.Fl w
54.Ar name Ns Li += Ns Ar value ...
55.Sh DESCRIPTION
56The
57.Nm
58command displays or sets various wscons system driver variables.
59If a list of variables is present on the command line, then
60.Nm
61prints the current value of those variables for the specified device.
62.Bl -tag -width Ds
63.It Fl a
64Specify all variables for the device.
65.It Fl d
66Select the display portion of the device.
67.It Fl f Ar file
68Specify an alternative control device.
69.It Fl k
70Select the keyboard portion of the device (this is the default).
71.It Fl m
72Select the mouse portion of the device.
73.It Fl n
74Suppress the printing of the variable name in the output -
75only the value will appear.
76.It Fl w
77Set or modify the specified variables to the given values.
78The value can be specified as either an absolute value, by using the
79.Ql =
80symbol or as a relative value, by using the
81.Ql +=
82symbol.
83See the
84.Sx EXAMPLES
85section for more details.
86.El
87.Pp
88The
89.Nm
90utility can be used to view and modify aspects of the keyboard,
91display, and mouse, using the standard, machine-independent
92workstation console device driver
93.Xr wscons 4 .
94.Pp
95The keyboard type can be modified, the keyboard bell's pitch,
96period, and duration can be modified, the
97.Ar typematic
98value can be changed, and the keyboard encoding can be modified
99to switch keys, should the user find a keyboard's default layout
100difficult to use.
101The keyboard types and other relevant definitions
102can all be found in the
103.Pa /usr/include/dev/wscons/wsksymdef.h
104file.
105.Pp
106The mouse types are defined in the
107.Pa /usr/include/dev/wscons/wsconsio.h
108file.
109.Pp
110The display types, height, width, depth (bits per pixel), color
111map size, and color map are defined in the
112.Pa /usr/include/dev/wscons/wsconsio.h
113file.
114There are also definitions relating to video control and cursor
115control, which are not applicable to all display types, and to text
116emulation and graphics (mapped) modes.
117.Sh FILES
118.Bl -tag -width /dev/wsmouse
119.It Pa /dev/wskbd
120keyboard control device
121.It Pa /dev/wsmouse
122mouse control device
123.It Pa /dev/ttyE0
124display control device
125.El
126.Sh EXAMPLES
127The following are just a few examples of
128.Nm
129and its functionality.
130.Pp
131.Dl wsconsctl -w encoding=uk
132.Pp
133Set a UK keyboard encoding.
134For a full list of supported keyboard encodings, see
135.Xr wskbd 4 .
136.Pp
137.Dl wsconsctl -w map+="keysym Caps_Lock = Control_L"
138.Pp
139Modify the current keyboard encoding so that when the
140.Ar Caps Lock
141key is pressed, the same encoding sequence as
142.Ar Left Control
143is sent.
144For a full list of keysyms and keycodes, please refer to the
145.Pa /usr/include/dev/wscons/wsksymdef.h
146file.
147.Pp
148.Dl wsconsctl -w encoding=us.swapctrlcaps
149.Pp
150Set a US keyboard encoding, with the
151.Ar Caps Lock
152and
153.Ar Left Control
154keys swapped.
155The
156.Ar .swapctrlcaps
157encoding does not work for all national keyboard encodings.
158For most purposes, the ability to set the value returned by the
159.Ar Caps Lock
160key is enough - see the previous example for details.
161.Pp
162.Dl wsconsctl -w bell.pitch=1200
163.Pp
164Set the bell pitch to be 1200.
165.Pp
166.Dl wsconsctl -w bell.pitch+=200
167.Pp
168Add 200 to the current pitch of the bell.
169.Pp
170.Dl wsconsctl -d -w msg.kernel.attrs=color,hilit msg.kernel.bg=red msg.kernel.fg=brown
171.Pp
172Set the color of kernel messages to brown on red with the highlighting
173flag set (becoming yellow on red).
174.Pp
175.Dl wsconsctl -w repeat.del1=200 repeat.deln=50
176.Pp
177Set the initial delay for keyboard auto repeat to 200ms, and subsequent
178delays to 50ms.
179.Pp
180.Dl wsconsctl -w repeat.del1=0
181.Pp
182Turn off auto repeat.
183.Pp
184.Dl wsconsctl -d -w scroll.fastlines=50
185.Pp
186If scroll support is enabled in the kernel, set the number of lines
187used in the fast scroll function to 50.
188.Pp
189.Dl wsconsctl -d -w scroll.slowlines=2
190.Pp
191If scroll support is enabled in the kernel, set the number of lines
192used in the slow scroll function to 2.
193In order to use this function, you have to have
194.Dv Cmd_ScrollSlowDown
195and
196.Dv Cmd_ScrollSlowUp
197defined in your keyboard map.
198.Sh SEE ALSO
199.Xr wscons 4 ,
200.Xr wskbd 4 ,
201.Xr wscons.conf 5 ,
202.Xr wsconscfg 8 ,
203.Xr wsfontload 8
204.Sh HISTORY
205The
206.Nm
207command first appeared in
208.Nx 1.4 .
209