1kbd(1)                           User Commands                          kbd(1)
2
3
4

NAME

6       kbd  -  manipulate  the  state of keyboard, or display the type of key‐
7       board, or change the default keyboard abort sequence effect
8

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

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

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 sys‐
52       tems.
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  inter‐
58       pretation. Due to the risk of incorrect sequence interpretation, binary
59       protocols such as SLIP and others should not be  run  over  the  serial
60       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 hexidecimal. 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 Alter‐
83       nate 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 sys‐
94       tems, setting the key switch to the secure position overrides any soft‐
95       ware 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 cur‐
123       rent value of the KEYBOARD_ABORT variable in the /etc/default/kbd  file
124       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 mil‐
137       liseconds (ms). To avoid making the keyboard unusable due  to  a  typo‐
138       graphical  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 millisec‐
148       onds. 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 kernel. These layouts  are  valid  for
172       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   CON‐
186       SOLE_BEEPER_FREQ  variable in the file /etc/default/kbd to the expected
187       value with units in HZ. This value  should  be  between  0  and  32767,
188       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

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 operat‐
205           ing system on most systems. This sequence is  typically  Stop-A  or
206           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       Enables  the  default  effect  of  the  keyboard abort
213                        sequence (suspend the operating system and  enter  the
214                        debugger or the monitor).
215
216
217           disable      Disables the default/alternate effect and ignores key‐
218                        board abort sequences.
219
220
221           alternate    Enables the alternate effect  of  the  keyboard  abort
222                        sequences  (suspend the operating system and enter the
223                        debugger or the monitor) upon receiving the  Alternate
224                        Break character sequence on the console. The Alternate
225                        Break sequence  is  defined  by  the  drivers  zs(7D),
226                        se(7D),  asy(7D).  Due to a risk of incorrect sequence
227                        interpretation, binary protocols cannot  be  run  over
228                        the serial console port when this value is used.
229
230
231
232       -b keyboard | console
233
234           Sets the beeper frequency for keyboard or console.
235
236           keyboard    Set the keyboard beeper frequency to the operand in HZ.
237                       See OPERANDS.
238
239
240           console     Sets the console beeper frequency to the operand in HZ.
241                       See OPERANDS.
242
243
244
245       -c on | off
246
247           Turns the clicking of the keyboard on or off.
248
249           on     Enables clicking
250
251
252           off    Disables clicking
253
254
255
256       -d keyboard device
257
258           Specifies  the  keyboard  device  being set. The default setting is
259           /dev/kbd.
260
261
262       -D autorepeat delay
263
264           Sets the autorepeat delay in milliseconds.
265
266
267       -i
268
269           Sets keyboard properties from the keyboard default file.  With  the
270           exception  of  -d  keyboard device, this option cannot be used with
271           any other option. The -i option instructs the keyboard  command  to
272           read  and  process  keyclick and keyboard abort default values from
273           the /etc/default/kbd file. The -i option can only be used by a user
274           or role with the Device Security Rights Profile.
275
276
277       -l
278
279           Returns the layout code of the keyboard being used, and the autore‐
280           peat delay and autorepeat rate being used.
281
282           If used with -R or -D option, this option returns the value  before
283           the changes.
284
285
286       -r
287
288           Resets the keyboard as if power-up.
289
290
291       -R autorepeat rate
292
293           Sets the autorepeat rate in milliseconds.
294
295
296       -s [language]
297
298           Sets the keyboard layout into kernel.
299
300           If  language  is  specified, the layout is set to language. If lan‐
301           guage is not specified, a list of available layouts are  presented,
302           prompting for the user to specify the language. See OPERANDS.
303
304
305       -t
306
307           Returns the type of the keyboard being used.
308
309

OPERANDS

311       The following operands are supported:
312
313       frequency    The  frequency  value  specified  to be set in kernel. The
314                    receiver of this value is specified by the -b option. This
315                    value  should  be  between  0  and 32767 otherwise will be
316                    ejected with EINVAL.
317
318
319       language     The language specified to be set in kernel.  If  the  lan‐
320                    guage is not found, the languages supported are listed for
321                    selection. It only applies to -s option.
322
323

EXAMPLES

325       Example 1 Displaying the Keyboard Type
326
327
328       The following example displays the keyboard type:
329
330
331         example% kbd -t
332         Type 4 Sun keyboard
333         example%
334
335
336
337       Example 2 Setting Keyboard Defaults
338
339
340       The following example sets the keyboard defaults as  specified  in  the
341       keyboard default file:
342
343
344         example# kbd -i
345         example#
346
347
348
349       Example 3 Displaying Information
350
351
352       The  following  example displays keyboard type and layout code. It also
353       displays auto repeat delay and rate settings.
354
355
356         example% kbd -l
357         type=4
358         layout=43 (0x2b)
359         delay(ms)=500
360         rate(ms)=33
361         example%
362
363
364
365       Example 4 Setting Keyboard Autorepeat Delay
366
367
368       The following example sets the keyboard autorepeat delay:
369
370
371         example% kbd -D 300
372         example%
373
374
375
376       Example 5 Setting Keyboard Autorepeat Rate
377
378
379       The following example sets the keyboard autorepeat rate:
380
381
382         example% kbd -R 50
383         example%
384
385
386
387       Example 6 Selecting and Setting the Keyboard Language
388
389
390       The following example selects and sets the  keyboard  language  from  a
391       list of languages specified:
392
393
394         example% kbd -s
395         1. Albanian                      16. Malta_UK
396         2. Belarusian                    17. Malta_US
397         3. Belgian                       18. Norwegian
398         4. Bulgarian                     19. Portuguese
399         5. Croatian                      20. Russian
400         6. Danish                        21. Serbia-And-Montenegro
401         7. Dutch                         22. Slove
402         ......
403
404         To select the keyboard layout, enter a number [default n]:
405
406         example%
407
408
409
410
411       The following example sets the keyboard language specified:
412
413
414         example% kbd -s Dutch
415         example%
416
417
418
419       Example 7 Setting the Keyboard Beeper Frequency
420
421
422       The following example sets the keyboard beeper frequency:
423
424
425         example% kbd -b keyboard 1000
426         example%
427
428
429

FILES

431       /dev/kbd            Keyboard device file.
432
433
434       /etc/default/kbd    Keyboard  default file containing software defaults
435                           for keyboard configurations.
436
437

ATTRIBUTES

439       See attributes(5) for descriptions of the following attributes:
440
441
442
443
444       ┌─────────────────────────────┬─────────────────────────────┐
445       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
446       ├─────────────────────────────┼─────────────────────────────┤
447       │Availability                 │SUNWcsu                      │
448       └─────────────────────────────┴─────────────────────────────┘
449

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

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 posi‐
460       tion 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
486SunOS 5.11                        29 Jan 2007                           kbd(1)
Impressum