1.\" $OpenBSD: wsconsctl.8,v 1.26 2022/02/06 00:29:02 jsg 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: February 6 2022 $ 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.Sh DESCRIPTION 49The 50.Nm 51command displays or sets various wscons system driver variables. 52If a list of variables is present on the command line, 53.Nm 54prints the current value of those variables for the specified device. 55.Pp 56The options are as follows: 57.Bl -tag -width Ds 58.It Fl a 59Print all device variables and their current values. 60This is the default, if no parameters are given to 61.Nm . 62.It Fl f Ar file 63Specify an alternative control device. 64.It Fl n 65Suppress printing of the variable name in the output. 66.It Ar name Ns = Ns Ar value 67Attempt to set the specified variable 68.Ar name 69to 70.Ar value . 71The value can be specified as either an absolute, by using the 72.Ql = 73symbol, 74or as a relative value, by using the 75.Ql += 76or 77.Ql -= 78symbols. 79See the 80.Sx EXAMPLES 81section for more details. 82.El 83.Pp 84The 85.Nm 86utility can be used to view and modify aspects of the keyboard, 87display, and mouse using the standard, machine-independent 88workstation console device driver 89.Xr wscons 4 . 90.Pp 91The keyboard type can be modified, the keyboard bell's pitch, period, 92and duration can be modified, 93the 94.Ar typematic 95value can be changed, and the keyboard encoding can be modified 96to switch keys, should the user find a keyboard's default layout 97difficult to use. 98.Pp 99There are also definitions relating to video 100control and cursor control, which are not applicable to 101all display types, and to text emulation and graphics 102(mapped) modes. 103.Pp 104Use the 105.Xr kbd 8 106utility to determine which keyboard encodings are available for your 107country. 108.Pp 109A keyboard mapping can also be specified in 110.Pa /etc/kbdtype . 111.Sh FILES 112.Bl -tag -width /usr/include/dev/wscons/wsconsio.h -compact 113.It Pa /dev/ttyC0 114display control device 115.It Pa /dev/wskbd0 116keyboard control device 117.It Pa /dev/wsmouse0 118mouse control device 119.It Pa /etc/kbdtype 120default keyboard mapping 121.It Pa /etc/wsconsctl.conf 122a list of parameters that get set at system startup time from 123.Xr rc 8 124.It Pa /usr/include/dev/wscons/wsconsio.h 125keyboard/mouse/display definitions 126.El 127.Sh EXAMPLES 128Set a UK keyboard encoding: 129.Pp 130.Dl # wsconsctl keyboard.encoding=uk 131.Pp 132Modify the current keyboard encoding so that, when the 133.Ar Caps Lock 134key is pressed, the same encoding sequence as 135.Ar Left Control 136is sent. 137For a full list of keysyms, and keycodes, refer 138to the 139.Ar /usr/include/dev/wscons/wsksymdef.h 140file. 141.Pp 142.Dl # wsconsctl keyboard.map+="keysym Caps_Lock = Control_L" 143.Pp 144Assign the 145.Ar Right Alt 146key to be the group modifier (layout is changed while the key is pressed): 147.Pp 148.Dl # wsconsctl keyboard.map+="keycode 184=Mode_switch" 149.Pp 150Assign the 151.Ar Right Control 152key to be the lock for the group modifier. 153The effect of 154.Ar Mode_Lock 155and 156.Ar Mode_switch 157is not mutually exclusive, to be consistent with 158.Ar Caps Lock 159and 160.Ar Shift 161behaviour. 162.Pp 163.Dl # wsconsctl keyboard.map+="keycode 157=Mode_Lock" 164.Pp 165Set a US keyboard encoding, with the 166.Ar Caps Lock 167and 168.Ar Left Control 169keys swapped. 170The 171.Ar .swapctrlcaps 172encoding does not work for all national keyboard encodings. 173For most purposes, the ability to set the value returned 174by the 175.Ar Caps Lock 176key is enough \- see the previous example for details. 177.Pp 178.Dl # wsconsctl keyboard.encoding=us.swapctrlcaps 179.Pp 180Set the bell pitch to be 1200: 181.Pp 182.Dl # wsconsctl keyboard.bell.pitch=1200 183.Pp 184Add 200 to the current pitch of the bell: 185.Pp 186.Dl # wsconsctl keyboard.bell.pitch+=200 187.Pp 188Set the display font to Gallant: 189.Pp 190.Dl # wsconsctl display.font=Gallant 191.Sh SEE ALSO 192.Xr pckbd 4 , 193.Xr wscons 4 , 194.Xr wsconsctl.conf 5 , 195.Xr kbd 8 , 196.Xr wsconscfg 8 , 197.Xr wsfontload 8 198.Sh HISTORY 199The 200.Nm 201command first appeared in 202.Nx 1.4 203and 204.Ox 2.8 . 205