summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/kbd.1
blob: aa014f8479629ca2e86b96ac6d5c9c9ff3549e90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH KBD 1 "Jan 29, 2007"
.SH NAME
kbd \- manipulate the state of keyboard, or display the type of keyboard, or
change the default keyboard abort sequence effect
.SH SYNOPSIS
.LP
.nf
\fBkbd\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
.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.
.SH EXTENDED DESCRIPTION
.LP
The \fB-i\fR option reads and processes default values for the keyclick and
keyboard abort settings from the \fB/etc/default/kbd\fR keyboard default file.
Only keyboards that support a clicker respond to the \fB-c\fR option. To turn
clicking on by default, add or change the value of the \fBKEYCLICK\fR variable
in the \fB/etc/default/kbd\fR file to:
.sp
.in +2
.nf
KEYCLICK=on
.fi
.in -2
.sp

.sp
.LP
Next, run the command \fBkbd\fR \fB-i\fR to change the setting. Valid settings
for the \fBKEYCLICK\fR variable are \fBon\fR and \fBoff\fR; all other values
are ignored. If the \fBKEYCLICK\fR variable is not specified in the default
file, the setting is unchanged.
.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
To permanently change the software default effect of the keyboard abort
sequence, first add or change the value of the \fBKEYBOARD_ABORT\fR variable in
the \fB/etc/default/kbd\fR file to:
.sp
.in +2
.nf
KEYBOARD_ABORT=disable
.fi
.in -2
.sp

.sp
.LP
Next, run the command \fBkbd\fR \fB-i\fR to change the setting. Valid settings
are \fBenable\fR, \fBdisable\fR, and \fBalternate\fR; all other values are
ignored. If the variable is not specified in the default file, the setting is
unchanged.
.sp
.LP
To set the abort sequence to the hardware BREAK, set the value of the
\fBKEYBOARD_ABORT\fR variable in the \fB/etc/default/kbd\fR file to:
.sp
.in +2
.nf
KEYBOARD_ABORT=enable
.fi
.in -2
.sp

.sp
.LP
To change the current setting, run the command \fBkbd\fR \fB-i\fR. To set the
abort sequence to the Alternate Break character sequence, first set the current
value of the \fBKEYBOARD_ABORT\fR variable in the \fB/etc/default/kbd\fR file
to:
.sp
.in +2
.nf
KEYBOARD_ABORT=alternate
.fi
.in -2
.sp

.sp
.LP
Next, run the command \fBkbd\fR \fB-i\fR to change the setting. When the
Alternate Break sequence is in effect, only serial console devices are
affected.
.sp
.LP
To set the autorepeat delay by default, set the \fBREPEAT_DELAY\fR variable in
the file \fB/etc/default/kbd\fR to the expected value with units in
milliseconds (ms). To avoid making the keyboard unusable due to a typographical
error, delay values below \fBKIOCRPTDELAY_MIN\fR (defined in
\fB/usr/include/sys/kbio.h\fR) are rejected with \fBEINVAL\fR:
.sp
.in +2
.nf
REPEAT_DELAY=500
.fi
.in -2
.sp

.sp
.LP
To set the autorepeat rate by default, set the \fBREPEAT_RATE\fR variable in
the file \fB/etc/default/kbd\fR to the expected value with units in
milliseconds. Negative and zero repeat rates are ejected with \fBEINVAL\fR:
.sp
.in +2
.nf
REPEAT_RATE=33
.fi
.in -2
.sp

.sp
.LP
To change the current settings of \fIdelay\fR and \fIrate\fR, run the command,
\fBkbd\fR \fB-i\fR. When the Auto Repeat Delay and/or Auto Repeat Rate are in
effect, only command line mode is affected.
.sp
.LP
To set the language by default, set the \fBLAYOUT\fR variable in the file
\fB/etc/default/kbd\fR to the expected language. These languages supported in
kernel can be found by running \fBkbd\fR \fB-s\fR. Other values are ignored.
For example, the following sets Spanish layout to the keyboard:
.sp
.in +2
.nf
LAYOUT=Spanish
.fi
.in -2
.sp

.sp
.LP
Next, run the \fBkbd\fR \fB-i\fR to change the setting. When Solaris reboots,
the Spanish key table is loaded into the kernel. These layouts are valid for
\fBusb\fR and \fBps/2\fR keyboards.
.sp
.LP
To set the keyboard beeper frequency by default, set the \fBKBD_BEEPER_FREQ\fR
variable in the file \fB/etc/default/kbd\fR to the expected value with units in
HZ. This value should be between 0 and 32767, inclusive. Otherwise will be
rejected with \fBEINVAL\fR:
.sp
.in +2
.nf
KBD_BEEPER_FREQ=2000
.fi
.in -2
.sp

.sp
.LP
To set the console beeper frequency by default, set the
\fBCONSOLE_BEEPER_FREQ\fR variable in the file \fB/etc/default/kbd\fR to the
expected value with units in HZ. This value should be between 0 and 32767,
inclusive. Otherwise will be rejected with \fBEINVAL\fR:
.sp
.in +2
.nf
CONSOLE_BEEPER_FREQ=900
.fi
.in -2
.sp

.sp
.LP
To change the current settings of keyboard beeper frequency and console beeper
frequency, run \fBkbd\fR \fB-i\fR.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.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
.na
\fB\fBenable\fR\fR
.ad
.RS 13n
Enables the default effect of the keyboard abort sequence (suspend the
operating system and enter the debugger or the monitor).
.RE

.sp
.ne 2
.na
\fB\fBdisable\fR\fR
.ad
.RS 13n
Disables the default/alternate effect and ignores keyboard abort sequences.
.RE

.sp
.ne 2
.na
\fB\fBalternate\fR\fR
.ad
.RS 13n
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
.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
.na
\fB\fBkeyboard\fR\fR
.ad
.RS 12n
Set the keyboard beeper frequency to the operand in HZ. See \fBOPERANDS\fR.
.RE

.sp
.ne 2
.na
\fB\fBconsole\fR\fR
.ad
.RS 12n
Sets the console beeper frequency to the operand in HZ. See \fBOPERANDS\fR.
.RE

.RE

.sp
.ne 2
.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
.na
\fB\fBon\fR\fR
.ad
.RS 7n
Enables clicking
.RE

.sp
.ne 2
.na
\fB\fBoff\fR\fR
.ad
.RS 7n
Disables clicking
.RE

.RE

.sp
.ne 2
.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
.na
\fB\fB-D\fR \fIautorepeat delay\fR\fR
.ad
.sp .6
.RS 4n
Sets the autorepeat delay in milliseconds.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR\fR
.ad
.sp .6
.RS 4n
Sets keyboard properties from the keyboard default file. With the exception of
\fB-d\fR \fIkeyboard device\fR, this option cannot be used with any other
option. The \fB-i\fR option instructs the keyboard command to read and process
keyclick and keyboard abort default values from the \fB/etc/default/kbd\fR
file. The \fB-i\fR option can only be used by a user or role with the Device
Security Rights Profile.
.RE

.sp
.ne 2
.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 -R or -D option, this option returns the value before the changes.
.RE

.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.sp .6
.RS 4n
Resets the keyboard as if power-up.
.RE

.sp
.ne 2
.na
\fB\fB-R\fR \fIautorepeat rate\fR\fR
.ad
.sp .6
.RS 4n
Sets the autorepeat rate in milliseconds.
.RE

.sp
.ne 2
.na
\fB\fB\fR\fB-s\fR \fB[\fR\fIlanguage\fR\fB]\fR\fR
.ad
.sp .6
.RS 4n
Sets the keyboard layout into the kernel.
.sp
If \fIlanguage\fR is specified, the layout is set to \fIlanguage\fR, and
\fBloadkeys\fR(1) runs implicitly. 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
.na
\fB\fB-t\fR\fR
.ad
.sp .6
.RS 4n
Returns the type of the keyboard being used.
.RE

.SH OPERANDS
.LP
The following operands are supported:
.sp
.ne 2
.na
\fBfrequency\fR
.ad
.RS 13n
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 will be ejected with \fBEINVAL\fR.
.RE

.sp
.ne 2
.na
\fBlanguage\fR
.ad
.RS 13n
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 keyboard
default file:

.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
.ne 2
.na
\fB\fB/dev/kbd\fR\fR
.ad
.RS 20n
Keyboard device file.
.RE

.sp
.ne 2
.na
\fB\fB/etc/default/kbd\fR\fR
.ad
.RS 20n
Keyboard default file containing software defaults for keyboard configurations.
.RE

.SH SEE ALSO
.LP
\fBloadkeys\fR(1), \fBsvcs\fR(1), \fBinetd\fR(1M), \fBinetadm\fR(1M),
\fBkadb\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
.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.