1.\" $NetBSD: wsconsctl.8,v 1.7 2001/11/16 10:25:52 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. See the 85.Ar EXAMPLES 86section for more details. 87.It Fl f Ar file 88is used to specify an alternative control device. 89.It Fl n 90suppresses the printing of the variable name in the output - 91only the value will appear. 92.It Fl k 93selects the keyboard portion of the device (this is the default). 94.It Fl d 95selects the display portion of the device. 96.It Fl m 97selects the mouse portion of the device. 98.El 99.Pp 100The 101.Nm 102utility can be used to view and modify aspects of the keyboard, 103display and mouse, using the standard, machine-independent 104workstation console device driver 105.Xr wscons 4 . 106.Pp 107The keyboard type can be modified, the keyboard bell's pitch, 108period and duration 109can be modified, 110the 111.Ar typematic 112value can be changed, and the keyboard encoding can be modified 113to switch keys, should the user find a keyboard's default layout 114difficult to use. 115The keyboard types and other relevant definitions, 116can all be found in the 117.Pa /usr/include/dev/wscons/wsconsio.h 118file. 119.Pp 120The mouse types are defined in the 121.Pa /usr/include/dev/wscons/wsconsio.h 122file. 123.Pp 124The keyboard types, and the height, width, 125depth (bits per pixel), color map size, and colormap 126are defined in the 127.Pa /usr/include/dev/wscons/wsconsio.h 128file. There are also definitions relating to video 129control and cursor control, which are not applicable to 130all display types, and to text emulation and graphics 131(mapped) modes. 132.Pp 133There are currently keyboard encodings for the following 134countries: user-defined, US, German, Danish, Italian, 135French, British and Japanese. 136.Sh FILES 137.Bl -tag -width /dev/wsmouse0 138.It Pa /dev/wskbd0 139keyboard control device 140.It Pa /dev/wsmouse0 141mouse control device 142.It Pa /dev/ttyE0 143display control device 144.El 145.Sh EXAMPLES 146The following are just a few examples of 147.Nm 148and its functionality. 149.Pp 150.Dl wsconsctl -w encoding=uk 151.Pp 152Sets a UK keyboard encoding. 153.Pp 154.Dl wsconsctl -w map+="keysym Caps_Lock = Control_L" 155.Pp 156Modifies the current keyboard encoding so that, when the 157.Ar Caps Lock 158key is pressed, the same encoding sequence as 159.Ar Left Control 160is sent. 161For a full list of keysyms, and keycodes, please refer 162to the 163.Pa /usr/include/dev/wscons/wsksymdef.h 164file. 165.Pp 166.Dl wsconsctl -w encoding=us.swapctrlcaps 167.Pp 168sets a US keyboard encoding, with the 169.Ar Caps Lock 170and 171.Ar Left Control 172keys swapped. The 173.Ar .swapctrlcaps 174encoding does not work for all national keyboard encodings. 175For most purposes, the ability to set the value returned 176by the 177.Ar Caps Lock 178key is enough - see the previous example for details. 179.Pp 180.Dl wsconsctl -w bell.pitch=1200 181.Pp 182Sets the bell pitch to be 1200, whilst 183.Pp 184.Dl wsconsctl -w bell.pitch+=200 185.Pp 186adds 200 to the current pitch of the bell. 187.Sh SEE ALSO 188.Xr pckbd 4 , 189.Xr wscons 4 , 190.Xr wsconscfg 8 , 191.Xr wsfontload 8 192.Sh HISTORY 193The 194.Nm 195command first appeared in 196.Nx 1.4 . 197