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