[BACK]Return to wskbd.4 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man4

File: [cvs.NetBSD.org] / src / share / man / man4 / wskbd.4 (download)

Revision 1.16, Sun May 27 12:05:40 2012 UTC (11 years, 10 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20190609, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Branch point for: phil-wifi, netbsd-9
Changes since 1.15: +7 -4 lines

New sentence, new line. Use more markup. Bump date for previous.

.\" $NetBSD: wskbd.4,v 1.16 2012/05/27 12:05:40 wiz Exp $
.\"
.\" Copyright (c) 1999
.\" 	Matthias Drochner.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd May 27, 2012
.Dt WSKBD 4
.Os
.Sh NAME
.Nm wskbd
.Nd generic keyboard support in wscons
.Sh SYNOPSIS
.Cd "wskbd* at pckbd? console ? mux 1"
(standard PC keyboard)
.Cd "wskbd* at ukbd? console ? mux 1"
(USB keyboard)
.Cd "wskbd* at lkkbd? console ? mux 1"
(DEC LK200/400 serial keyboard)
.Cd "wskbd0 at akbd? console ? mux 1"
(Apple ADB keyboard)
.Cd "wskbd0 at nextkbd? console ? mux 1"
(NeXT keyboard)
.Cd "wskbd* at vrkiu? console ? mux 1"
(NEC VR4000 series HPC keyboard)
.Cd "wskbd* at skbd? console ? mux 1"
(keyboard of misc hpcmips handheld devices)
.Cd "wskbd* at btkbd? console ? mux 1"
(Bluetooth keyboard)
.Sh DESCRIPTION
The
.Nm
driver handles common tasks for keyboards within the
.Xr wscons 4
framework.
It is attached to the hardware specific keyboard drivers and
provides their connection to
.Dq wsdisplay
devices and a character device interface.
.Pp
The common keyboard support consists of:
.Bl -bullet
.It
Mapping from keycodes (defined by the specific keyboard driver) to
keysyms (hardware independent, defined in
.Pa /usr/include/dev/wscons/wsksymdef.h ) .
.It
Handling of
.Dq compose
sequences.
Characters commonly not present as separate key on keyboards
can be generated after either a special
.Dq compose
key is pressed or a
.Dq dead accent
character is used.
.It
Certain translations, like turning an
.Dq ALT
modifier into an
.Dq ESC
prefix.
.It
Automatic key repetition
.Pq Dq typematic .
.It
Parameter handling for
.Dq keyboard bells .
.It
Generation of
.Dq keyboard events
for use by X servers.
.El
.Pp
The
.Nm
driver provides a number of ioctl functions to control key maps
and other parameters.
These functions are accessible though the associated
.Dq wsdisplay
device as well.
A complete list is in
.Pa /usr/include/dev/wscons/wsconsio.h .
The
.Xr wsconsctl 8
utility allows to access key maps and other variables.
.Pp
The
.Em console
locator in the configuration line refers to the device's use as input
part of the operating system console.
A device specification containing a positive value here will only
match if the device is in use as system console.
(The console device selection in early system startup is not influenced.)
This way, the console device can be connected to a known
wskbd device instance.
.Ss Ioctls
The following
.Xr ioctl 2
calls are provided by the
.Nm
driver or by devices which use it.
Their definitions are found in
.Pa dev/wscons/wsconsio.h .
.Bl -tag -width Dv
.It Dv WSKBDIO_GTYPE
Get the keyboard type.
.It Dv WSKBDIO_COMPLEXBELL, WSKBDIO_SETBELL, WSKBDIO_GETBELL, WSKBDIO_SETDEFAULTBELL, WSKBDIO_GETDEFAULTBELL Pq Li "struct wsmouse_repeat"
Get and set keyboard bell settings.
.It Dv WSKBDIO_SETKEYREPEAT, WSKBDIO_GETKEYREPEAT, WSKBDIO_SETDEFAULTKEYREPEAT, WSKBDIO_GETDEFAULTKEYREPEAT Pq Li "struct wskbd_keyrepeat_data"
Get and set keyboard autorepeat settings.
.It Dv WSKBDIO_SETLEDS, WSKBDIO_GETLEDS Pq Li "int"
Get and set keyboard LED settings.
.It Dv WSKBDIO_GETMAP, WSKBDIO_SETMAP Pq Li "struct wskbd_map_data"
Get and set keyboard keymapping settings.
.It Dv WSKBDIO_GETENCODING, WSKBDIO_SETENCODING Pq Li "kbd_t"
Get and set keyboard encoding settings.
.It Dv WSKBDIO_GETKEYCLICK, WSKBDIO_SETKEYCLICK Pq Li "int"
Get and set keyboard keyclick settings.
.It Dv WSKBDIO_SETVERSION Pq Li "int"
Set the wscons_event protocol version.
The default is 0 for binary compatibility.
The latest version is
always available as
.Dv WSKBD_EVENT_VERSION ,
and is currently 1.
All new code should use a call similar to the below to ensure the
correct version is returned.
.Bd -literal -offset indent
int ver = WSKBD_EVENT_VERSION;
if (ioctl(fd, WSKBDIO_SETVERSION, &ver) == -1)
    err(EXIT_FAILURE, "cannot set version");
.Ed
.El
.Sh FILES
.Bl -item
.It
.Pa /dev/wskbd*
.It
.Pa /usr/include/dev/wscons/wsksymdef.h
.It
.Pa /usr/include/dev/wscons/wsconsio.h .
.El
.Sh SEE ALSO
.Xr btkbd 4 ,
.Xr pckbd 4 ,
.Xr ukbd 4 ,
.Xr wscons 4 ,
.Xr wsmux 4 ,
.Xr wsconsctl 8 ,
.Xr wskbd 9