1.\" $NetBSD: wsconsctl.8,v 1.25 2008/04/30 13:10:53 martin 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 October 22, 2006 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.Pp 118In addition to British, US, and US-Dvorak keyboard encodings, support 119currently exists for the following languages: Danish, Finnish, French, 120German, Italian, Japanese, Norwegian, Portuguese, Spanish, and Swedish. 121Additionally, a user-defined encoding is supported. 122.Sh FILES 123.Bl -tag -width /dev/wsmouse 124.It Pa /dev/wskbd 125keyboard control device 126.It Pa /dev/wsmouse 127mouse control device 128.It Pa /dev/ttyE0 129display control device 130.El 131.Sh EXAMPLES 132The following are just a few examples of 133.Nm 134and its functionality. 135.Pp 136.Dl wsconsctl -w encoding=uk 137.Pp 138Set a UK keyboard encoding. 139.Pp 140.Dl wsconsctl -w map+="keysym Caps_Lock = Control_L" 141.Pp 142Modify the current keyboard encoding so that when the 143.Ar Caps Lock 144key is pressed, the same encoding sequence as 145.Ar Left Control 146is sent. 147For a full list of keysyms and keycodes, please refer to the 148.Pa /usr/include/dev/wscons/wsksymdef.h 149file. 150.Pp 151.Dl wsconsctl -w encoding=us.swapctrlcaps 152.Pp 153Set a US keyboard encoding, with the 154.Ar Caps Lock 155and 156.Ar Left Control 157keys swapped. 158The 159.Ar .swapctrlcaps 160encoding does not work for all national keyboard encodings. 161For most purposes, the ability to set the value returned by the 162.Ar Caps Lock 163key is enough - see the previous example for details. 164.Pp 165.Dl wsconsctl -w bell.pitch=1200 166.Pp 167Set the bell pitch to be 1200. 168.Pp 169.Dl wsconsctl -w bell.pitch+=200 170.Pp 171Add 200 to the current pitch of the bell. 172.Pp 173.Dl wsconsctl -d -w msg.kernel.attrs=color,hilit msg.kernel.bg=red msg.kernel.fg=brown 174.Pp 175Set the color of kernel messages to brown on red with the highlighting 176flag set (becoming yellow on red). 177.Pp 178.Dl wsconsctl -w repeat.del1=200 repeat.deln=50 179.Pp 180Set the initial delay for keyboard auto repeat to 200ms, and subsequent 181delays to 50ms. 182.Pp 183.Dl wsconsctl -w repeat.del1=0 184.Pp 185Turn off auto repeat. 186.Pp 187.Dl wsconsctl -d -w scroll.fastlines=50 188.Pp 189If scroll support is enabled in the kernel, set the number of lines 190used in the fast scroll function to 50. 191.Pp 192.Dl wsconsctl -d -w scroll.slowlines=2 193.Pp 194If scroll support is enabled in the kernel, set the number of lines 195used in the slow scroll function to 2. 196In order to use this function, you have to have 197.Dv Cmd_ScrollSlowDown 198and 199.Dv Cmd_ScrollSlowUp 200defined in your keyboard map. 201.Sh SEE ALSO 202.Xr pckbd 4 , 203.Xr wscons 4 , 204.Xr wsconscfg 8 , 205.Xr wsfontload 8 206.Sh HISTORY 207The 208.Nm 209command first appeared in 210.Nx 1.4 . 211