.\" Contributed to 386bsd 0.1 and later versions
.\" Copyright 1992 by Holger Veit
.\" May be freely used with Bill Jolitz's port of
.\" 386bsd and may be included in a 386bsd collection
.\" as long as binary and source are available and reproduce the above
.\" You may freely modify this code and contribute improvements based
.\" on this code as long as you don't claim to be the original author.
.\" Commercial use of this source requires permittance of the copyright
.\" holder. A general license for 386bsd will override this restriction.
.\" Use at your own risk. The copyright holder or any person who makes
.\" this code available for the public (administrators of public archives
.\" for instance) are not responsible for any harm to hardware or software
.\" that might happen due to wrong application or program faults.
.\" You must have the codriver driver in the same package generated
.\" into the 386bsd kernel, otherwise this program does not work.
.\" @(#)keycap.3 1.0 (contributed to 386bsd) 10/25/92
.Nd keyboard independent operation routines
.Fn kgetent "char *bp" "char *name"
.Fn kgetstr "char *id" "char *area"
These functions extract and use capabilities from a keyboard capability data
.Pa /usr/share/misc/keycap ,
the format of which is described in
extracts the entry for a keyboard entry
should be a character buffer of size
1024 and must be retained through all subsequent calls to
returns \-1 if none of the
data base files could be opened,
0 if the keyboard name given does not have an entry,
It will look in the environment for a
If found, and the value does not begin with a slash,
is the same as the environment string
string is used instead of reading a
If it does begin with a slash, the string is used as a path name
does not begin with a slash,
gets the numeric value of capability
returning \-1 if is not given for the keyboard
returns 1 if the specified capability is present in
the keyboard's entry, 0 if it is not.
returns the string value of the capability
places it in the buffer at
It decodes the abbreviations for this field described in
if the capability was not found.
.Bl -tag -width /usr/share/misc/keycap -compact
.It Pa /usr/lib/libconsutil.a
.It Pa /usr/share/misc/keycap
standard keyboard capability data base
keyboard capability data base is a new feature of 386bsd 0.2 and later.