summaryrefslogtreecommitdiff
path: root/static/netbsd/man4/man4.sparc/kbd.4 3.html
blob: 602de745a308bc92e89ce3c977d2de8a4251015d (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
<table class="head">
  <tr>
    <td class="head-ltitle">KBD(4)</td>
    <td class="head-vol">Device Drivers Manual (sparc)</td>
    <td class="head-rtitle">KBD(4)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">kbd</code> &#x2014; <span class="Nd">Sun
    workstation keyboard</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">pseudo-device kbd</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">kbd</code> driver provides an interface to
    the workstation console keyboard. The Sun &quot;type 2&quot;, &quot;type
    3&quot;, &quot;type 4&quot;, and &quot;type 5&quot; keyboards are supported.
    The &quot;type 5&quot; keyboard is treated as if it were a &quot;type
    4&quot;. All types generate keycodes encoding the key identity and motion
    (up or down) as the keys are pressed and released. The
    <code class="Nm">kbd</code> driver either passes the keycodes to an
    application as they come in (e.g.) <a class="Xr">Xorg(1)</a>, or translates
    them into ASCII characters first according to a set of built-in tables.</p>
<p class="Pp">If the <code class="Nm">kbd</code> is configured as the device to
    be used for system console input (see <a class="Xr">sparc/openprom(4)</a>),
    it will be internally connected to the <span class="Pa">/dev/console</span>
    device special file, which can be used as a <a class="Xr">tty(4)</a>
  device.</p>
<p class="Pp">The device special file <span class="Pa">/dev/kbd</span> is used
    to get direct access to the keyboard input stream.</p>
<p class="Pp">The following ioctl's are supported (mostly just enough to keep
    the <a class="Xr">Xorg(1)</a> server going):</p>
<dl class="Bl-tag">
  <dt>KIOCTRANS</dt>
  <dd>Set translation mode. The argument is of type <var class="Fa">int *</var>,
      the only value supported is <code class="Dv">TR_UNTRANS_EVENT</code>.</dd>
  <dt>KIOCGTRANS</dt>
  <dd>Get translation mode. The argument is of type <var class="Fa">int *</var>.
      <code class="Dv">TR_UNTRANS_EVENT</code> is always returned.</dd>
  <dt>KIOCGETKEY</dt>
  <dd>Fill in old-style key station translation. The argument is of type
      <var class="Fa">struct okiockey *</var>.</dd>
  <dt>KIOCCMD</dt>
  <dd>Send a command to the keyboard. The argument is of type
      <var class="Fa">int *</var>, and can have one of the following values:
    <dl class="Bl-tag">
      <dt>KBD_CMD_BELL</dt>
      <dd>Start the keyboard beeper.</dd>
      <dt>KBD_CMD_NOBELL</dt>
      <dd>Stop the keyboard beeper.</dd>
      <dt>KBD_CMD_CLICK</dt>
      <dd>Instruct the keyboard to make extra noise when touching keys.</dd>
      <dt>KBD_CMD_NOCLICK</dt>
      <dd>Instruct the keyboard to stop making extra noise when touching
        keys.</dd>
    </dl>
  </dd>
  <dt>KIOCTYPE</dt>
  <dd>Get keyboard type. The argument is of type <var class="Fa">int *</var>, in
      which one of the values <code class="Dv">KB_SUN2</code>,
      <code class="Dv">KB_SUN3</code> or <code class="Dv">KB_SUN4</code> will be
      returned.</dd>
  <dt>KIOCSDIRECT</dt>
  <dd>Route the keyboard input stream through the SunOS compatible event module.
      The argument is of type <var class="Fa">int *</var>, a non-zero value will
      put the driver into &quot;event&quot; mode, while a value of zero will
      make it return to &quot;ASCII translation&quot; mode.</dd>
  <dt>KIOCSKEY</dt>
  <dd>Set key station translation. The argument is of type
      <var class="Fa">struct kiockey *</var> (see
      <span class="Pa">/usr/include/machine/kbio.h</span> <span class="No">for
      more details</span>).</dd>
  <dt>KIOCGKEY</dt>
  <dd>Get key station translation. The argument is of type
      <var class="Fa">struct kiockey *</var>.</dd>
  <dt>KIOCLAYOUT</dt>
  <dd>Get keyboard layout (&#x201C;type 4&#x201D; only). The argument is of type
      <var class="Fa">int *</var>, in which the uninterpreted result of the
      <code class="Dv">KBD_CMD_GLAYOUT</code> keyboard command is returned (on
      <code class="Dv">KB_SUN4</code> type keyboards this will be the setting of
      a DIP switch bank).</dd>
  <dt>KIOCSLED</dt>
  <dd>Set LED state (&#x201C;type 4&#x201D; only). The argument is of type
      <var class="Fa">char *</var>, and is the inclusive OR of the following
      flags:
    <p class="Pp"></p>
    <dl class="Bl-tag Bl-compact">
      <dt>LED_NUM_LOCK</dt>
      <dd style="width: auto;">&#x00A0;</dd>
      <dt>LED_COMPOSE</dt>
      <dd style="width: auto;">&#x00A0;</dd>
      <dt>LED_SCROLL_LOCK</dt>
      <dd style="width: auto;">&#x00A0;</dd>
      <dt>LED_CAPS_LOCK</dt>
      <dd style="width: auto;">&#x00A0;</dd>
    </dl>
    <p class="Pp">Each of these flags turn on the LED in the obvious key.</p>
  </dd>
  <dt>KIOCGLED</dt>
  <dd>Get LED state (&#x201C;type 4&#x201D; only). The argument is of type
      <var class="Fa">char *</var>, in which the current LED state is
    returned.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">sparc/ms(4)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp"><code class="Nm">kbd</code> is hardwired to the built-in
    <a class="permalink" href="#zs1"><i class="Em" id="zs1">zs1</i></a> serial
    port at 1200 bps.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">February 17, 2017</td>
    <td class="foot-os">NetBSD 10.1</td>
  </tr>
</table>