[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Files Reference


kbd Special File

Purpose

Provides access to the natively attached keyboard.

Description

The kbd special file is the interface to the native keyboard. It provides an interface through which applications can receive operator input from the keyboard, control the keyboard LED's, and changing various keyboard parameters. The special file also allows an application to send an audible signal to the operator via the speaker located within the keyboard.

Configuration

The sound volume, click volume, typematic rate and typematic delay are configurable by the application through the ioctl subroutine. These changes are not reflected in the ODM database. To change these attributes in the ODM database, use the chhwkbd command.

Usage Considerations

open

This subroutine call creates a channel between the application and the natively attached keyboard. Two channels are supported. The open subroutine call is processed normally except that the MODE and Oflag parameters are ignored. All keyboard input is flushed until an input ring is established. Only the input ring associated with the most recent open receives input reports.

close

When the kbd device has been opened twice, input is reported through the input ring registered previous to the first open, after the close subroutine call.

read and write

The keyboard device driver does not return nor accept data via read and write. These calls behave as if the call was made to /dev/null. Input data is received from the input drivers via the input ring.

ioctl

The keyboard device driver supports the following ioctl commands:

IOCINFO Return devinfo structure.
KSALARM Sound alarm.
KSCFGCLICK Control keyboard click.
KSDIAGMODE Enable/disable diagnostics mode (user mode only).
KSLED Set/reset keyboard LED's.
KSKAP Enable/disable keep alive poll (user mode only).
KSKAPACK Acknowledge keep alive poll (user mode only).
KSQUERYID Query keyboard device identifier.
KSQUERYSV Query keyboard service vector (kernel mode only).
KSREGRING Register input ring.
KSRFLUSH Flush input ring.
KSTDELAY Set typamatic delay.
KSTRATE Set typamatic rate.
KSVOLUME Set alarm volume

Error Codes

The error codes can be found in the /usr/include/sys/errno.h file.

EFAULT indicates insufficient authority to access address or invalid address.
EIO indicates that an I/O error occurred.
ENOMEM indicates there was insufficient memory for required paging operation.
ENOSPC indicates there was insufficient file system or paging space.
EINVAL indicates that an invalid argument was specified.
EINTR indicates the request was interrupted by signal.
EPERM indicates that a permanent error occurred.
EBUSY indicates the device is busy.
ENXIO indicates unsupported device number was specified.
ENODEV indicates an unsupported device or device type mismatch.

Implementation Specifics

The kbd special file is part of Base Operating System (BOS) Runtime.

Files


/usr/include/sys/inputdd.h Contains declarations for ioctl commands and input ring report format.

Related Information

The close subroutine, ioctl subroutine, open subroutine, read subroutine, write subroutine.

Special Files Overview .


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]