'\" te .\" Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. .TH kbd 1 "06 Apr 2015" "SunOS 5.11" "User Commands" .SH NAME kbd \- manipulate the state of the keyboard, or display the type of the keyboard, or change the default keyboard abort sequence effect .SH SYNOPSIS .LP .nf \fBkbd\fR [\fB-T\fR] [\fB-r\fR] [\fB-t\fR ] [\fB-l\fR] [\fB-a\fR enable | disable | alternate] [\fB-c\fR on | off] [\fB-d\fR \fIkeyboard device\fR] [\fB-D\fR \fIautorepeat delay\fR] [\fB-R\fR \fIautorepeat rate\fR] .fi .LP .nf \fBkbd\fR [\fB-i\fR] [\fB-d\fR \fIkeyboard device\fR] .fi .LP .nf \fBkbd\fR \fB-s\fR [\fIlanguage\fR] .fi .LP .nf \fBkbd\fR \fB-b\fR [\fBkeyboard\fR | \fBconsole\fR] \fIfrequency\fR .fi .SH DESCRIPTION .sp .LP The \fBkbd\fR utility manipulates the state of the keyboard, or displays the keyboard type, or allows the default keyboard abort sequence effect to be changed. The abort sequence also applies to serial console devices. The \fBkbd\fR utility sets the \fB/dev/kbd\fR default keyboard device. .sp .LP For users with the \fBsolaris.smf.value.keymap\fR authorizations, such as those with the Device Security Rights Profile, all changes are permanent unless the \fB-T\fR option is given or when a keyboard device is specified on the commandline. .SH EXTENDED DESCRIPTION .sp .LP The \fB-i\fR option reads and processes default values for the \fBkeyclick\fR and \fBkeyboard\fR abort settings from the keyboard configuration service, \fBsvc:/system/keymap:default\fR. Only keyboards that support a clicker respond to the \fB-c\fR option. .sp .LP The keyboard abort sequence effect can only be changed by a super user using the \fB-a\fR option. This sequence is typically Stop-A or L1-A and Shift-Pause on the keyboard on \fBSPARC\fR systems, F1-A and Shift-Pause on x86 systems, and BREAK on the serial console input device on most systems. .sp .LP A \fBBREAK\fR condition that originates from an erroneous electrical signal cannot be distinguished from one deliberately sent by remote \fBDCE\fR. As a remedy, use the \fB-a\fR option with Alternate Break to switch break interpretation. Due to the risk of incorrect sequence interpretation, binary protocols such as \fBSLIP\fR and others should not be run over the serial console port when Alternate Break sequence is in effect. .sp .LP Although PPP is a binary protocol, it has the ability to avoid using characters that interfere with serial operation. The default alternate break sequence is CTRL-m \fB~\fR CTRL-b, or \fB0D 7E 02\fR in hexidecimal. In PPP, this can be avoided by setting either \fB0x00000004\fR or \fB0x00002000\fR in the ACCM. This forces an escape for the CTRL-b or CTRL-m characters, respectively. .sp .LP To do this in Solaris PPP 4.0, add: .sp .in +2 .nf asyncmap 0x00002000 .fi .in -2 .sp .sp .LP to the \fB/etc/ppp/options\fR file or any of the other configuration files used for the connection. See \fBpppd\fR(1M). .sp .LP SLIP has no comparable capability, and must not be used if the Alternate Break sequence is in use. .sp .LP The Alternate Break sequence has no effect on the keyboard abort. For more information on the Alternate Break sequence, see \fBzs\fR(7D),\fBse\fR(7D), and \fBasy\fR(7D). .sp .LP On many systems, the default effect of the keyboard abort sequence is to suspend the operating system and enter the debugger or the monitor. Some systems feature key switches with a \fBsecure\fR position. On these systems, setting the key switch to the \fBsecure\fR position overrides any software default set with this command. .sp .LP When the Alternate Break sequence is in effect, only serial console devices are affected. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-T\fR\fR .ad .sp .6 .RS 4n All changes are temporary and reverted when the system is rebooted, \fBkbd -i\fR is run or when the \fBsvc:/system/keymap:default\fR is refreshed. For users without the proper authorization all changes are temporary whether the \fB-T\fR option is supplied or not. .RE .sp .ne 2 .mk .na \fB\fB-a\fR \fBenable\fR | \fBdisable\fR | \fBalternate\fR\fR .ad .sp .6 .RS 4n Enables, disables, or alternates the keyboard abort sequence effect. By default, a keyboard abort sequence suspends the operating system on most systems. This sequence is typically Stop-A or L1-A and Shift-Pause on the keyboard on \fBSPARC\fR systems, F1-A and Shift-Pause on x86 systems, and BREAK on the serial console device. .sp The default keyboard behavior can be changed using this option. The \fB-a\fR option can only be used by a super user. .sp .ne 2 .mk .na \fB\fBenable\fR\fR .ad .RS 13n .rt Enables the default effect of the keyboard abort sequence (suspend the operating system and enter the debugger or the monitor). .RE .sp .ne 2 .mk .na \fB\fBdisable\fR\fR .ad .RS 13n .rt Disables the default/alternate effect and ignores keyboard abort sequences. .RE .sp .ne 2 .mk .na \fB\fBalternate\fR\fR .ad .RS 13n .rt Enables the alternate effect of the keyboard abort sequences (suspend the operating system and enter the debugger or the monitor) upon receiving the Alternate Break character sequence on the console. The Alternate Break sequence is defined by the drivers \fBzs\fR(7D), \fBse\fR(7D), \fBasy\fR(7D). Due to a risk of incorrect sequence interpretation, binary protocols cannot be run over the serial console port when this value is used. .RE .RE .sp .ne 2 .mk .na \fB\fB-b\fR \fBkeyboard\fR | \fBconsole\fR\fR .ad .sp .6 .RS 4n Sets the beeper frequency for keyboard or console. .sp .ne 2 .mk .na \fB\fBkeyboard\fR\fR .ad .RS 12n .rt Set the keyboard beeper frequency to the operand in HZ. See \fBOPERANDS\fR. .RE .sp .ne 2 .mk .na \fB\fBconsole\fR\fR .ad .RS 12n .rt Sets the console beeper frequency to the operand in HZ. See \fBOPERANDS\fR. .RE .RE .sp .ne 2 .mk .na \fB\fB-c\fR \fBon\fR | \fBoff\fR\fR .ad .sp .6 .RS 4n Turns the clicking of the keyboard on or off. .sp .ne 2 .mk .na \fB\fBon\fR\fR .ad .RS 7n .rt Enables clicking .RE .sp .ne 2 .mk .na \fB\fBoff\fR\fR .ad .RS 7n .rt Disables clicking .RE .RE .sp .ne 2 .mk .na \fB\fB-d\fR \fIkeyboard device\fR\fR .ad .sp .6 .RS 4n Specifies the keyboard device being set. The default setting is \fB/dev/kbd\fR. .RE .sp .ne 2 .mk .na \fB\fB-D\fR \fIautorepeat delay\fR\fR .ad .sp .6 .RS 4n Sets the autorepeat delay in milliseconds. .RE .sp .ne 2 .mk .na \fB\fB-i\fR\fR .ad .sp .6 .RS 4n Sets keyboard properties from the keymap service. With the exception of -d keyboard device, this option cannot be used with any other option. The -i option instructs the keyboard command to read and process \fBkeyclick\fR and \fBkeyboard\fR abort default values from the keyboard properties in the \fBkeymap\fR service. The \fB-i\fR option can only be used by a user or role with the Device Security Rights Profile. .RE .sp .ne 2 .mk .na \fB\fB-l\fR\fR .ad .sp .6 .RS 4n Returns the layout code of the keyboard being used, and the autorepeat delay and autorepeat rate being used. .sp If used with \fB-R\fR or \fB-D\fR option, this option returns the value before the changes. .RE .sp .ne 2 .mk .na \fB\fB-r\fR\fR .ad .sp .6 .RS 4n Resets the keyboard as if power-up. .RE .sp .ne 2 .mk .na \fB\fB-R\fR \fIautorepeat rate\fR\fR .ad .sp .6 .RS 4n Sets the autorepeat rate in milliseconds. .RE .sp .ne 2 .mk .na \fB\fB\fR\fB-s\fR \fB[\fR\fIlanguage\fR\fB]\fR\fR .ad .sp .6 .RS 4n Sets the keyboard layout into kernel. .sp If \fIlanguage\fR is specified, the layout is set to \fIlanguage\fR. If \fIlanguage\fR is not specified, a list of available layouts are presented, prompting for the user to specify the \fIlanguage\fR. See \fBOPERANDS\fR. .RE .sp .ne 2 .mk .na \fB\fB-t\fR\fR .ad .sp .6 .RS 4n Returns the type of the keyboard being used. .RE .SH OPERANDS .sp .LP The following operands are supported: .sp .ne 2 .mk .na \fBfrequency\fR .ad .RS 13n .rt The frequency value specified to be set in kernel. The receiver of this value is specified by the \fB-b\fR option. This value should be between 0 and 32767 otherwise it is ejected with \fBEINVAL\fR. .RE .sp .ne 2 .mk .na \fBlanguage\fR .ad .RS 13n .rt The language specified to be set in kernel. If the language is not found, the languages supported are listed for selection. It only applies to \fB-s\fR option. .RE .SH EXAMPLES .LP \fBExample 1 \fRDisplaying the Keyboard Type .sp .LP The following example displays the keyboard type: .sp .in +2 .nf example% kbd -t Type 4 Sun keyboard example% .fi .in -2 .sp .LP \fBExample 2 \fRSetting Keyboard Defaults .sp .LP The following example sets the keyboard defaults as specified in the keymap service: .sp .in +2 .nf example# kbd -i example# .fi .in -2 .sp .LP \fBExample 3 \fRDisplaying Information .sp .LP The following example displays keyboard type and layout code. It also displays auto repeat delay and rate settings. .sp .in +2 .nf example% kbd -l type=4 layout=43 (0x2b) delay(ms)=500 rate(ms)=33 example% .fi .in -2 .sp .LP \fBExample 4 \fRSetting Keyboard Autorepeat Delay .sp .LP The following example sets the keyboard autorepeat delay: .sp .in +2 .nf example% kbd -D 300 example% .fi .in -2 .sp .LP \fBExample 5 \fRSetting Keyboard Autorepeat Rate .sp .LP The following example sets the keyboard autorepeat rate: .sp .in +2 .nf example% kbd -R 50 example% .fi .in -2 .sp .LP \fBExample 6 \fRSelecting and Setting the Keyboard Language .sp .LP The following example selects and sets the keyboard language from a list of languages specified: .sp .in +2 .nf example% kbd -s 1. Albanian 16. Malta_UK 2. Belarusian 17. Malta_US 3. Belgian 18. Norwegian 4. Bulgarian 19. Portuguese 5. Croatian 20. Russian 6. Danish 21. Serbia-And-Montenegro 7. Dutch 22. Slove \&...... To select the keyboard layout, enter a number [default n]: example% .fi .in -2 .sp .sp .LP The following example sets the keyboard language specified: .sp .in +2 .nf example% kbd -s Dutch example% .fi .in -2 .sp .LP \fBExample 7 \fRSetting the Keyboard Beeper Frequency .sp .LP The following example sets the keyboard beeper frequency: .sp .in +2 .nf example% kbd -b keyboard 1000 example% .fi .in -2 .sp .SH FILES .sp .ne 2 .mk .na \fB\fB/dev/kbd\fR\fR .ad .RS 12n .rt Keyboard device file .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os .TE .SH SEE ALSO .sp .LP \fBkmdb\fR(1), \fBloadkeys\fR(1), \fBsvcs\fR(1), \fBsvccfg\fR(1M), \fBsvcadm\fR(1M), \fBpppd\fR(1M), \fBkeytables\fR(4), \fBattributes\fR(5), \fBsmf\fR(5), \fBkb\fR(7M), \fBzs\fR(7D), \fBse\fR(7D), \fBasy\fR(7D), \fBvirtualkm\fR(7D) .SH NOTES .sp .LP Some server systems have key switches with a \fBsecure\fR key position that can be read by system software. This key position overrides the normal default of the keyboard abort sequence effect and changes the default so the effect is disabled. When the key switch is in the \fBsecure\fR position on these systems, the keyboard abort sequence effect cannot be overridden by the software default, which is settable with the \fBkbd\fR utility. .sp .LP Currently, there is no way to determine the state of the keyboard click setting. .sp .LP The \fBkdb\fR service is managed by the service management facility, \fBsmf\fR(5), under the service identifier: .sp .in +2 .nf svc:/system/keymap:default .fi .in -2 .sp .sp .LP Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using \fBsvcadm\fR(1M). Responsibility for initiating and restarting this service is delegated to \fBinetd\fR(1M). Use \fBinetadm\fR(1M) to make configuration changes and to view configuration information for this service. The service's status can be queried using the \fBsvcs\fR(1) command.