1 KBD(1)                           User Commands                          KBD(1)
   2 
   3 
   4 
   5 NAME
   6        kbd - manipulate the state of keyboard, or display the type of
   7        keyboard, or change the default keyboard abort sequence effect
   8 
   9 SYNOPSIS
  10        kbd [-r] [-t ] [-l] [-a enable | disable | alternate]
  11             [-c on | off] [-d keyboard device]
  12             [-D autorepeat delay] [-R autorepeat rate]
  13 
  14 
  15        kbd [-i] [-d keyboard device]
  16 
  17 
  18        kbd -s [language]
  19 
  20 
  21        kbd -b [keyboard | console] frequency
  22 
  23 
  24 DESCRIPTION
  25        The kbd utility manipulates the state of the keyboard, or displays the
  26        keyboard type, or allows the default keyboard abort sequence effect to
  27        be changed. The abort sequence also applies to serial console devices.
  28        The kbd utility sets the /dev/kbd default keyboard device.
  29 
  30 EXTENDED DESCRIPTION
  31        The -i option reads and processes default values for the keyclick and
  32        keyboard abort settings from the /etc/default/kbd keyboard default
  33        file.  Only keyboards that support a clicker respond to the -c option.
  34        To turn clicking on by default, add or change the value of the KEYCLICK
  35        variable in the /etc/default/kbd file to:
  36 
  37          KEYCLICK=on
  38 
  39 
  40 
  41 
  42        Next, run the command kbd -i to change the setting. Valid settings for
  43        the KEYCLICK variable are on and off; all other values are ignored. If
  44        the KEYCLICK variable is not specified in the default file, the setting
  45        is unchanged.
  46 
  47 
  48        The keyboard abort sequence effect can only be changed by a super-user
  49        using the -a option. This sequence is typically Stop-A or L1-A and
  50        Shift-Pause on the keyboard on SPARC systems, F1-A and Shift-Pause on
  51        x86 systems, and BREAK on the serial console input device on most
  52        systems.
  53 
  54 
  55        A BREAK condition that originates from an erroneous electrical signal
  56        cannot be distinguished from one deliberately sent by remote DCE. As a
  57        remedy, use the -a option with Alternate Break to switch break
  58        interpretation. Due to the risk of incorrect sequence interpretation,
  59        binary protocols such as SLIP and others should not be run over the
  60        serial console port when Alternate Break sequence is in effect.
  61 
  62 
  63        Although PPP is a binary protocol, it has the ability to avoid using
  64        characters that interfere with serial operation. The default alternate
  65        break sequence is CTRL-m ~ CTRL-b, or 0D 7E 02 in hexadecimal. In PPP,
  66        this can be avoided by setting either 0x00000004 or 0x00002000 in the
  67        ACCM.  This forces an escape for the CTRL-b or CTRL-m characters,
  68        respectively.
  69 
  70 
  71        To do this in Solaris PPP 4.0, add:
  72 
  73          asyncmap 0x00002000
  74 
  75 
  76 
  77 
  78        to the /etc/ppp/options file or any of the other configuration files
  79        used for the connection. See pppd(1M).
  80 
  81 
  82        SLIP has no comparable capability, and must not be used if the
  83        Alternate Break sequence is in use.
  84 
  85 
  86        The Alternate Break sequence has no effect on the keyboard abort. For
  87        more information on the Alternate Break sequence, see zs(7D), se(7D),
  88        and asy(7D).
  89 
  90 
  91        On many systems, the default effect of the keyboard abort sequence is
  92        to suspend the operating system and enter the debugger or the monitor.
  93        Some systems feature key switches with a secure position. On these
  94        systems, setting the key switch to the secure position overrides any
  95        software default set with this command.
  96 
  97 
  98        To permanently change the software default effect of the keyboard abort
  99        sequence, first add or change the value of the KEYBOARD_ABORT variable
 100        in the /etc/default/kbd file to:
 101 
 102          KEYBOARD_ABORT=disable
 103 
 104 
 105 
 106 
 107        Next, run the command kbd -i to change the setting. Valid settings are
 108        enable, disable, and alternate; all other values are ignored. If the
 109        variable is not specified in the default file, the setting is
 110        unchanged.
 111 
 112 
 113        To set the abort sequence to the hardware BREAK, set the value of the
 114        KEYBOARD_ABORT variable in the /etc/default/kbd file to:
 115 
 116          KEYBOARD_ABORT=enable
 117 
 118 
 119 
 120 
 121        To change the current setting, run the command kbd -i. To set the abort
 122        sequence to the Alternate Break character sequence, first set the
 123        current value of the KEYBOARD_ABORT variable in the /etc/default/kbd
 124        file to:
 125 
 126          KEYBOARD_ABORT=alternate
 127 
 128 
 129 
 130 
 131        Next, run the command kbd -i to change the setting. When the Alternate
 132        Break sequence is in effect, only serial console devices are affected.
 133 
 134 
 135        To set the autorepeat delay by default, set the REPEAT_DELAY variable
 136        in the file /etc/default/kbd to the expected value with units in
 137        milliseconds (ms). To avoid making the keyboard unusable due to a
 138        typographical error, delay values below KIOCRPTDELAY_MIN (defined in
 139        /usr/include/sys/kbio.h) are rejected with EINVAL:
 140 
 141          REPEAT_DELAY=500
 142 
 143 
 144 
 145 
 146        To set the autorepeat rate by default, set the REPEAT_RATE variable in
 147        the file /etc/default/kbd to the expected value with units in
 148        milliseconds. Negative and zero repeat rates are ejected with EINVAL:
 149 
 150          REPEAT_RATE=33
 151 
 152 
 153 
 154 
 155        To change the current settings of delay and rate, run the command, kbd
 156        -i. When the Auto Repeat Delay and/or Auto Repeat Rate are in effect,
 157        only command line mode is affected.
 158 
 159 
 160        To set the language by default, set the LAYOUT variable in the file
 161        /etc/default/kbd to the expected language. These languages supported in
 162        kernel can be found by running kbd -s. Other values are ignored.  For
 163        example, the following sets Spanish layout to the keyboard:
 164 
 165          LAYOUT=Spanish
 166 
 167 
 168 
 169 
 170        Next, run the kbd -i to change the setting. When Solaris reboots, the
 171        Spanish key table is loaded into the kernel. These layouts are valid
 172        for usb and ps/2 keyboards.
 173 
 174 
 175        To set the keyboard beeper frequency by default, set the
 176        KBD_BEEPER_FREQ variable in the file /etc/default/kbd to the expected
 177        value with units in HZ. This value should be between 0 and 32767,
 178        inclusive. Otherwise will be rejected with EINVAL:
 179 
 180          KBD_BEEPER_FREQ=2000
 181 
 182 
 183 
 184 
 185        To set the console beeper frequency by default, set the
 186        CONSOLE_BEEPER_FREQ variable in the file /etc/default/kbd to the
 187        expected value with units in HZ. This value should be between 0 and
 188        32767, inclusive. Otherwise will be rejected with EINVAL:
 189 
 190          CONSOLE_BEEPER_FREQ=900
 191 
 192 
 193 
 194 
 195        To change the current settings of keyboard beeper frequency and console
 196        beeper frequency, run kbd -i.
 197 
 198 OPTIONS
 199        The following options are supported:
 200 
 201        -a enable | disable | alternate
 202 
 203            Enables, disables, or alternates the keyboard abort sequence
 204            effect. By default, a keyboard abort sequence suspends the
 205            operating system on most systems. This sequence is typically Stop-A
 206            or L1-A and Shift-Pause on the keyboard on SPARC systems, F1-A and
 207            Shift-Pause on x86 systems, and BREAK on the serial console device.
 208 
 209            The default keyboard behavior can be changed using this option. The
 210            -a option can only be used by a super-user.
 211 
 212            enable
 213                         Enables the default effect of the keyboard abort
 214                         sequence (suspend the operating system and enter the
 215                         debugger or the monitor).
 216 
 217 
 218            disable
 219                         Disables the default/alternate effect and ignores
 220                         keyboard abort sequences.
 221 
 222 
 223            alternate
 224                         Enables the alternate effect of the keyboard abort
 225                         sequences (suspend the operating system and enter the
 226                         debugger or the monitor) upon receiving the Alternate
 227                         Break character sequence on the console. The Alternate
 228                         Break sequence is defined by the drivers zs(7D),
 229                         se(7D), asy(7D). Due to a risk of incorrect sequence
 230                         interpretation, binary protocols cannot be run over
 231                         the serial console port when this value is used.
 232 
 233 
 234 
 235        -b keyboard | console
 236 
 237            Sets the beeper frequency for keyboard or console.
 238 
 239            keyboard
 240                        Set the keyboard beeper frequency to the operand in HZ.
 241                        See OPERANDS.
 242 
 243 
 244            console
 245                        Sets the console beeper frequency to the operand in HZ.
 246                        See OPERANDS.
 247 
 248 
 249 
 250        -c on | off
 251 
 252            Turns the clicking of the keyboard on or off.
 253 
 254            on
 255                   Enables clicking
 256 
 257 
 258            off
 259                   Disables clicking
 260 
 261 
 262 
 263        -d keyboard device
 264 
 265            Specifies the keyboard device being set. The default setting is
 266            /dev/kbd.
 267 
 268 
 269        -D autorepeat delay
 270 
 271            Sets the autorepeat delay in milliseconds.
 272 
 273 
 274        -i
 275 
 276            Sets keyboard properties from the keyboard default file. With the
 277            exception of -d keyboard device, this option cannot be used with
 278            any other option. The -i option instructs the keyboard command to
 279            read and process keyclick and keyboard abort default values from
 280            the /etc/default/kbd file. The -i option can only be used by a user
 281            or role with the Device Security Rights Profile.
 282 
 283 
 284        -l
 285 
 286            Returns the layout code of the keyboard being used, and the
 287            autorepeat delay and autorepeat rate being used.
 288 
 289            If used with -R or -D option, this option returns the value before
 290            the changes.
 291 
 292 
 293        -r
 294 
 295            Resets the keyboard as if power-up.
 296 
 297 
 298        -R autorepeat rate
 299 
 300            Sets the autorepeat rate in milliseconds.
 301 
 302 
 303        -s [language]
 304 
 305            Sets the keyboard layout into the kernel.
 306 
 307            If language is specified, the layout is set to language, and
 308            loadkeys(1) runs implicitly. If language is not specified, a list
 309            of available layouts are presented, prompting for the user to
 310            specify the language. See OPERANDS.
 311 
 312 
 313        -t
 314 
 315            Returns the type of the keyboard being used.
 316 
 317 
 318 OPERANDS
 319        The following operands are supported:
 320 
 321        frequency
 322                     The frequency value specified to be set in kernel. The
 323                     receiver of this value is specified by the -b option. This
 324                     value should be between 0 and 32767 otherwise will be
 325                     ejected with EINVAL.
 326 
 327 
 328        language
 329                     The language specified to be set in kernel. If the
 330                     language is not found, the languages supported are listed
 331                     for selection. It only applies to -s option.
 332 
 333 
 334 EXAMPLES
 335        Example 1 Displaying the Keyboard Type
 336 
 337 
 338        The following example displays the keyboard type:
 339 
 340 
 341          example% kbd -t
 342          Type 4 Sun keyboard
 343          example%
 344 
 345 
 346 
 347        Example 2 Setting Keyboard Defaults
 348 
 349 
 350        The following example sets the keyboard defaults as specified in the
 351        keyboard default file:
 352 
 353 
 354          example# kbd -i
 355          example#
 356 
 357 
 358 
 359        Example 3 Displaying Information
 360 
 361 
 362        The following example displays keyboard type and layout code. It also
 363        displays auto repeat delay and rate settings.
 364 
 365 
 366          example% kbd -l
 367          type=4
 368          layout=43 (0x2b)
 369          delay(ms)=500
 370          rate(ms)=33
 371          example%
 372 
 373 
 374 
 375        Example 4 Setting Keyboard Autorepeat Delay
 376 
 377 
 378        The following example sets the keyboard autorepeat delay:
 379 
 380 
 381          example% kbd -D 300
 382          example%
 383 
 384 
 385 
 386        Example 5 Setting Keyboard Autorepeat Rate
 387 
 388 
 389        The following example sets the keyboard autorepeat rate:
 390 
 391 
 392          example% kbd -R 50
 393          example%
 394 
 395 
 396 
 397        Example 6 Selecting and Setting the Keyboard Language
 398 
 399 
 400        The following example selects and sets the keyboard language from a
 401        list of languages specified:
 402 
 403 
 404          example% kbd -s
 405          1. Albanian                      16. Malta_UK
 406          2. Belarusian                    17. Malta_US
 407          3. Belgian                       18. Norwegian
 408          4. Bulgarian                     19. Portuguese
 409          5. Croatian                      20. Russian
 410          6. Danish                        21. Serbia-And-Montenegro
 411          7. Dutch                         22. Slove
 412          ......
 413 
 414          To select the keyboard layout, enter a number [default n]:
 415 
 416          example%
 417 
 418 
 419 
 420 
 421        The following example sets the keyboard language specified:
 422 
 423 
 424          example% kbd -s Dutch
 425          example%
 426 
 427 
 428 
 429        Example 7 Setting the Keyboard Beeper Frequency
 430 
 431 
 432        The following example sets the keyboard beeper frequency:
 433 
 434 
 435          example% kbd -b keyboard 1000
 436          example%
 437 
 438 
 439 
 440 FILES
 441        /dev/kbd
 442                            Keyboard device file.
 443 
 444 
 445        /etc/default/kbd
 446                            Keyboard default file containing software defaults
 447                            for keyboard configurations.
 448 
 449 
 450 SEE ALSO
 451        loadkeys(1), svcs(1), inetd(1M), inetadm(1M), kadb(1M), svcadm(1M),
 452        pppd(1M), keytables(4), attributes(5), smf(5), kb(7M), zs(7D), se(7D),
 453        asy(7D), virtualkm(7D)
 454 
 455 NOTES
 456        Some server systems have key switches with a secure key position that
 457        can be read by system software. This key position overrides the normal
 458        default of the keyboard abort sequence effect and changes the default
 459        so the effect is disabled. When the key switch is in the secure
 460        position on these systems, the keyboard abort sequence effect cannot be
 461        overridden by the software default, which is settable with the kbd
 462        utility.
 463 
 464 
 465        Currently, there is no way to determine the state of the keyboard click
 466        setting.
 467 
 468 
 469        The kdb service is managed by the service management facility, smf(5),
 470        under the service identifier:
 471 
 472          svc:/system/keymap:default
 473 
 474 
 475 
 476 
 477        Administrative actions on this service, such as enabling, disabling, or
 478        requesting restart, can be performed using svcadm(1M). Responsibility
 479        for initiating and restarting this service is delegated to inetd(1M).
 480        Use inetadm(1M) to make configuration changes and to view configuration
 481        information for this service. The service's status can be queried using
 482        the svcs(1) command.
 483 
 484 
 485 
 486                                January 29, 2007                         KBD(1)