1.\" $OpenBSD: wsconsctl.8,v 1.23 2008/08/04 07:32:51 sobrado Exp $ 2.\" $NetBSD: wsconsctl.8,v 1.5 1999/09/12 18:47:11 kleink Exp $ 3.\" 4.\" Copyright (c) 1998 The NetBSD Foundation, Inc. 5.\" All rights reserved. 6.\" 7.\" This code is derived from software contributed to The NetBSD Foundation 8.\" by Juergen Hannken-Illjes. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29.\" POSSIBILITY OF SUCH DAMAGE. 30.\"/ 31.Dd $Mdocdate: August 4 2008 $ 32.Dt WSCONSCTL 8 33.Os 34.Sh NAME 35.Nm wsconsctl 36.Nd get or set wscons state 37.Sh SYNOPSIS 38.Nm wsconsctl 39.Op Fl an 40.Nm wsconsctl 41.Op Fl n 42.Op Fl f Ar file 43.Ar name ... 44.Nm wsconsctl 45.Op Fl n 46.Op Fl f Ar file 47.Ar name Ns = Ns Ar value ... 48.Nm wsconsctl 49.Op Fl n 50.Op Fl f Ar file 51.Ar name Ns += Ns Ar value ... 52.Sh DESCRIPTION 53The 54.Nm 55command displays or sets various wscons system driver variables. 56If a list of variables is present on the command line, 57.Nm 58prints the current value of those variables for the specified device. 59.Pp 60The options are as follows: 61.Bl -tag -width Ds 62.It Fl a 63Print all device variables and their current values. 64This is the default, if no parameters are given to 65.Nm . 66.It Fl f Ar file 67Specify an alternative control device. 68.It Fl n 69Suppress printing of the variable name in the output. 70.It Ar name Ns = Ns Ar value 71Attempt to set the specified variable 72.Ar name 73to 74.Ar value . 75The value can be specified as either an absolute, by using the 76.Ql = 77symbol, 78or as a relative value, by using the 79.Ql += 80symbol. 81See the 82.Sx EXAMPLES 83section for more details. 84.El 85.Pp 86The 87.Nm 88utility can be used to view and modify aspects of the keyboard, 89display, and mouse using the standard, machine-independent 90workstation console device driver 91.Xr wscons 4 . 92.Pp 93The keyboard type can be modified, the keyboard bell's pitch, period, 94and duration can be modified, 95the 96.Ar typematic 97value can be changed, and the keyboard encoding can be modified 98to switch keys, should the user find a keyboard's default layout 99difficult to use. 100.Pp 101There are also definitions relating to video 102control and cursor control, which are not applicable to 103all display types, and to text emulation and graphics 104(mapped) modes. 105.Pp 106Use the 107.Xr kbd 8 108utility to determine which keyboard encodings are available for your 109country. 110.Pp 111A keyboard mapping can also be specified in 112.Pa /etc/kbdtype . 113.Sh FILES 114.Bl -tag -width /usr/include/dev/wscons/wsconsio.h -compact 115.It Pa /dev/ttyC0 116display control device 117.It Pa /dev/wskbd0 118keyboard control device 119.It Pa /dev/wsmouse0 120mouse control device 121.It Pa /etc/kbdtype 122default keyboard mapping 123.It Pa /etc/wsconsctl.conf 124a list of parameters that get set at system startup time from 125.Xr rc 8 126.It Pa /usr/include/dev/wscons/wsconsio.h 127keyboard/mouse/display definitions 128.El 129.Sh EXAMPLES 130Set a UK keyboard encoding: 131.Pp 132.Dl # wsconsctl keyboard.encoding=uk 133.Pp 134Modify the current keyboard encoding so that, when the 135.Ar Caps Lock 136key is pressed, the same encoding sequence as 137.Ar Left Control 138is sent. 139For a full list of keysyms, and keycodes, please refer 140to the 141.Ar /usr/include/dev/wscons/wsksymdef.h 142file. 143.Pp 144.Dl # wsconsctl keyboard.map+="keysym Caps_Lock = Control_L" 145.Pp 146Assign the 147.Ar Right Alt 148key to be the group modifier (layout is changed while the key is pressed): 149.Pp 150.Dl # wsconsctl keyboard.map+="keycode 184=Mode_switch" 151.Pp 152Assign the 153.Ar Right Control 154key to be the lock for the group modifier. 155The effect of 156.Ar Mode_Lock 157and 158.Ar Mode_switch 159is not mutually exclusive, to be consistent with 160.Ar Caps Lock 161and 162.Ar Shift 163behaviour. 164.Pp 165.Dl # wsconsctl keyboard.map+="keycode 157=Mode_Lock" 166.Pp 167Set a US keyboard encoding, with the 168.Ar Caps Lock 169and 170.Ar Left Control 171keys swapped. 172The 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 keyboard.encoding=us.swapctrlcaps 181.Pp 182Set the bell pitch to be 1200: 183.Pp 184.Dl # wsconsctl keyboard.bell.pitch=1200 185.Pp 186Add 200 to the current pitch of the bell: 187.Pp 188.Dl # wsconsctl keyboard.bell.pitch+=200 189.Sh SEE ALSO 190.Xr pckbd 4 , 191.Xr wscons 4 , 192.Xr wsconsctl.conf 5 , 193.Xr kbd 8 , 194.Xr wsconscfg 8 , 195.Xr wsfontload 8 196.Sh HISTORY 197The 198.Nm 199command first appeared in 200.Nx 1.4 201and 202.Ox 2.8 . 203