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