2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH KBD 1 "Jan 29, 2007"
8 kbd \- manipulate the state of keyboard, or display the type of keyboard, or
9 change the default keyboard abort sequence effect
13 \fBkbd\fR [\fB-r\fR] [\fB-t\fR ] [\fB-l\fR] [\fB-a\fR enable | disable | alternate]
14 [\fB-c\fR on | off] [\fB-d\fR \fIkeyboard device\fR]
15 [\fB-D\fR \fIautorepeat delay\fR] [\fB-R\fR \fIautorepeat rate\fR]
20 \fBkbd\fR [\fB-i\fR] [\fB-d\fR \fIkeyboard device\fR]
25 \fBkbd\fR \fB-s\fR [\fIlanguage\fR]
30 \fBkbd\fR \fB-b\fR [\fBkeyboard\fR | \fBconsole\fR] \fIfrequency\fR
36 The \fBkbd\fR utility manipulates the state of the keyboard, or displays the
37 keyboard type, or allows the default keyboard abort sequence effect to be
38 changed. The abort sequence also applies to serial console devices. The
39 \fBkbd\fR utility sets the \fB/dev/kbd\fR default keyboard device.
40 .SH EXTENDED DESCRIPTION
43 The \fB-i\fR option reads and processes default values for the keyclick and
44 keyboard abort settings from the \fB/etc/default/kbd\fR keyboard default file.
45 Only keyboards that support a clicker respond to the \fB-c\fR option. To turn
46 clicking on by default, add or change the value of the \fBKEYCLICK\fR variable
47 in the \fB/etc/default/kbd\fR file to:
58 Next, run the command \fBkbd\fR \fB-i\fR to change the setting. Valid settings
59 for the \fBKEYCLICK\fR variable are \fBon\fR and \fBoff\fR; all other values
60 are ignored. If the \fBKEYCLICK\fR variable is not specified in the default
61 file, the setting is unchanged.
64 The keyboard abort sequence effect can only be changed by a super-user using
65 the \fB-a\fR option. This sequence is typically Stop-A or L1-A and Shift-Pause
66 on the keyboard on \fBSPARC\fR systems, F1-A and Shift-Pause on x86 systems,
67 and BREAK on the serial console input device on most systems.
70 A \fBBREAK\fR condition that originates from an erroneous electrical signal
71 cannot be distinguished from one deliberately sent by remote \fBDCE\fR. As a
72 remedy, use the \fB-a\fR option with Alternate Break to switch break
73 interpretation. Due to the risk of incorrect sequence interpretation, binary
74 protocols such as \fBSLIP\fR and others should not be run over the serial
75 console port when Alternate Break sequence is in effect.
78 Although PPP is a binary protocol, it has the ability to avoid using characters
79 that interfere with serial operation. The default alternate break sequence is
80 CTRL-m \fB~\fR CTRL-b, or \fB0D 7E 02\fR in hexidecimal. In PPP, this can be
81 avoided by setting either \fB0x00000004\fR or \fB0x00002000\fR in the ACCM.
82 This forces an escape for the CTRL-b or CTRL-m characters, respectively.
85 To do this in Solaris PPP 4.0, add:
96 to the \fB/etc/ppp/options\fR file or any of the other configuration files used
97 for the connection. See \fBpppd\fR(1M).
100 SLIP has no comparable capability, and must not be used if the Alternate Break
104 The Alternate Break sequence has no effect on the keyboard abort. For more
105 information on the Alternate Break sequence, see \fBzs\fR(7D),\fBse\fR(7D), and
109 On many systems, the default effect of the keyboard abort sequence is to
110 suspend the operating system and enter the debugger or the monitor. Some
111 systems feature key switches with a \fBsecure\fR position. On these systems,
112 setting the key switch to the \fBsecure\fR position overrides any software
113 default set with this command.
116 To permanently change the software default effect of the keyboard abort
117 sequence, first add or change the value of the \fBKEYBOARD_ABORT\fR variable in
118 the \fB/etc/default/kbd\fR file to:
122 KEYBOARD_ABORT=disable
129 Next, run the command \fBkbd\fR \fB-i\fR to change the setting. Valid settings
130 are \fBenable\fR, \fBdisable\fR, and \fBalternate\fR; all other values are
131 ignored. If the variable is not specified in the default file, the setting is
135 To set the abort sequence to the hardware BREAK, set the value of the
136 \fBKEYBOARD_ABORT\fR variable in the \fB/etc/default/kbd\fR file to:
140 KEYBOARD_ABORT=enable
147 To change the current setting, run the command \fBkbd\fR \fB-i\fR. To set the
148 abort sequence to the Alternate Break character sequence, first set the current
149 value of the \fBKEYBOARD_ABORT\fR variable in the \fB/etc/default/kbd\fR file
154 KEYBOARD_ABORT=alternate
161 Next, run the command \fBkbd\fR \fB-i\fR to change the setting. When the
162 Alternate Break sequence is in effect, only serial console devices are
166 To set the autorepeat delay by default, set the \fBREPEAT_DELAY\fR variable in
167 the file \fB/etc/default/kbd\fR to the expected value with units in
168 milliseconds (ms). To avoid making the keyboard unusable due to a typographical
169 error, delay values below \fBKIOCRPTDELAY_MIN\fR (defined in
170 \fB/usr/include/sys/kbio.h\fR) are rejected with \fBEINVAL\fR:
181 To set the autorepeat rate by default, set the \fBREPEAT_RATE\fR variable in
182 the file \fB/etc/default/kbd\fR to the expected value with units in
183 milliseconds. Negative and zero repeat rates are ejected with \fBEINVAL\fR:
194 To change the current settings of \fIdelay\fR and \fIrate\fR, run the command,
195 \fBkbd\fR \fB-i\fR. When the Auto Repeat Delay and/or Auto Repeat Rate are in
196 effect, only command line mode is affected.
199 To set the language by default, set the \fBLAYOUT\fR variable in the file
200 \fB/etc/default/kbd\fR to the expected language. These languages supported in
201 kernel can be found by running \fBkbd\fR \fB-s\fR. Other values are ignored.
202 For example, the following sets Spanish layout to the keyboard:
213 Next, run the \fBkbd\fR \fB-i\fR to change the setting. When Solaris reboots,
214 the Spanish key table is loaded into kernel. These layouts are valid for
215 \fBusb\fR and \fBps/2\fR keyboards.
218 To set the keyboard beeper frequency by default, set the \fBKBD_BEEPER_FREQ\fR
219 variable in the file \fB/etc/default/kbd\fR to the expected value with units in
220 HZ. This value should be between 0 and 32767, inclusive. Otherwise will be
221 rejected with \fBEINVAL\fR:
232 To set the console beeper frequency by default, set the
233 \fBCONSOLE_BEEPER_FREQ\fR variable in the file \fB/etc/default/kbd\fR to the
234 expected value with units in HZ. This value should be between 0 and 32767,
235 inclusive. Otherwise will be rejected with \fBEINVAL\fR:
239 CONSOLE_BEEPER_FREQ=900
246 To change the current settings of keyboard beeper frequency and console beeper
247 frequency, run \fBkbd\fR \fB-i\fR.
251 The following options are supported:
255 \fB\fB-a\fR \fBenable\fR | \fBdisable\fR | \fBalternate\fR\fR
259 Enables, disables, or alternates the keyboard abort sequence effect. By
260 default, a keyboard abort sequence suspends the operating system on most
261 systems. This sequence is typically Stop-A or L1-A and Shift-Pause on the
262 keyboard on \fBSPARC\fR systems, F1-A and Shift-Pause on x86 systems, and BREAK
263 on the serial console device.
265 The default keyboard behavior can be changed using this option. The \fB-a\fR
266 option can only be used by a super-user.
273 Enables the default effect of the keyboard abort sequence (suspend the
274 operating system and enter the debugger or the monitor).
283 Disables the default/alternate effect and ignores keyboard abort sequences.
289 \fB\fBalternate\fR\fR
292 Enables the alternate effect of the keyboard abort sequences (suspend the
293 operating system and enter the debugger or the monitor) upon receiving the
294 Alternate Break character sequence on the console. The Alternate Break sequence
295 is defined by the drivers \fBzs\fR(7D), \fBse\fR(7D), \fBasy\fR(7D). Due to a
296 risk of incorrect sequence interpretation, binary protocols cannot be run over
297 the serial console port when this value is used.
305 \fB\fB-b\fR \fBkeyboard\fR | \fBconsole\fR\fR
309 Sets the beeper frequency for keyboard or console.
316 Set the keyboard beeper frequency to the operand in HZ. See \fBOPERANDS\fR.
325 Sets the console beeper frequency to the operand in HZ. See \fBOPERANDS\fR.
333 \fB\fB-c\fR \fBon\fR | \fBoff\fR\fR
337 Turns the clicking of the keyboard on or off.
361 \fB\fB-d\fR \fIkeyboard device\fR\fR
365 Specifies the keyboard device being set. The default setting is \fB/dev/kbd\fR.
371 \fB\fB-D\fR \fIautorepeat delay\fR\fR
375 Sets the autorepeat delay in milliseconds.
385 Sets keyboard properties from the keyboard default file. With the exception of
386 \fB-d\fR \fIkeyboard device\fR, this option cannot be used with any other
387 option. The \fB-i\fR option instructs the keyboard command to read and process
388 keyclick and keyboard abort default values from the \fB/etc/default/kbd\fR
389 file. The \fB-i\fR option can only be used by a user or role with the Device
390 Security Rights Profile.
400 Returns the layout code of the keyboard being used, and the autorepeat delay
401 and autorepeat rate being used.
403 If used with -R or -D option, this option returns the value before the changes.
413 Resets the keyboard as if power-up.
419 \fB\fB-R\fR \fIautorepeat rate\fR\fR
423 Sets the autorepeat rate in milliseconds.
429 \fB\fB\fR\fB-s\fR \fB[\fR\fIlanguage\fR\fB]\fR\fR
433 Sets the keyboard layout into kernel.
435 If \fIlanguage\fR is specified, the layout is set to \fIlanguage\fR. If
436 \fIlanguage\fR is not specified, a list of available layouts are presented,
437 prompting for the user to specify the \fIlanguage\fR. See \fBOPERANDS\fR.
447 Returns the type of the keyboard being used.
453 The following operands are supported:
460 The frequency value specified to be set in kernel. The receiver of this value
461 is specified by the \fB-b\fR option. This value should be between 0 and 32767
462 otherwise will be ejected with \fBEINVAL\fR.
471 The language specified to be set in kernel. If the language is not found, the
472 languages supported are listed for selection. It only applies to \fB-s\fR
478 \fBExample 1 \fRDisplaying the Keyboard Type
481 The following example displays the keyboard type:
494 \fBExample 2 \fRSetting Keyboard Defaults
497 The following example sets the keyboard defaults as specified in the keyboard
510 \fBExample 3 \fRDisplaying Information
513 The following example displays keyboard type and layout code. It also displays
514 auto repeat delay and rate settings.
530 \fBExample 4 \fRSetting Keyboard Autorepeat Delay
533 The following example sets the keyboard autorepeat delay:
545 \fBExample 5 \fRSetting Keyboard Autorepeat Rate
548 The following example sets the keyboard autorepeat rate:
560 \fBExample 6 \fRSelecting and Setting the Keyboard Language
563 The following example selects and sets the keyboard language from a list of
570 1. Albanian 16. Malta_UK
571 2. Belarusian 17. Malta_US
572 3. Belgian 18. Norwegian
573 4. Bulgarian 19. Portuguese
574 5. Croatian 20. Russian
575 6. Danish 21. Serbia-And-Montenegro
579 To select the keyboard layout, enter a number [default n]:
588 The following example sets the keyboard language specified:
593 example% kbd -s Dutch
600 \fBExample 7 \fRSetting the Keyboard Beeper Frequency
603 The following example sets the keyboard beeper frequency:
608 example% kbd -b keyboard 1000
621 Keyboard device file.
627 \fB\fB/etc/default/kbd\fR\fR
630 Keyboard default file containing software defaults for keyboard configurations.
636 \fBloadkeys\fR(1), \fBsvcs\fR(1), \fBinetd\fR(1M), \fBinetadm\fR(1M),
637 \fBkadb\fR(1M), \fBsvcadm\fR(1M), \fBpppd\fR(1M), \fBkeytables\fR(4),
638 \fBattributes\fR(5), \fBsmf\fR(5), \fBkb\fR(7M), \fBzs\fR(7D), \fBse\fR(7D),
639 \fBasy\fR(7D), \fBvirtualkm\fR(7D)
643 Some server systems have key switches with a \fBsecure\fR key position that can
644 be read by system software. This key position overrides the normal default of
645 the keyboard abort sequence effect and changes the default so the effect is
646 disabled. When the key switch is in the \fBsecure\fR position on these systems,
647 the keyboard abort sequence effect cannot be overridden by the software
648 default, which is settable with the \fBkbd\fR utility.
651 Currently, there is no way to determine the state of the keyboard click
655 The \fBkdb\fR service is managed by the service management facility,
656 \fBsmf\fR(5), under the service identifier:
660 svc:/system/keymap:default
667 Administrative actions on this service, such as enabling, disabling, or
668 requesting restart, can be performed using \fBsvcadm\fR(1M). Responsibility for
669 initiating and restarting this service is delegated to \fBinetd\fR(1M). Use
670 \fBinetadm\fR(1M) to make configuration changes and to view configuration
671 information for this service. The service's status can be queried using the
672 \fBsvcs\fR(1) command.