lpfk Special File

Purpose

Provides access to the lighted program function key (LPFK) array.

Description

The lpfk special file is the application interface to the lighted program function keys. It allows the application to receive operator input from the LPFKs and to illuminate and darken each key in the array.

Configuration

Standard configuration methods are provided for the lpfk special file. The user cannot enter configurable attributes by way of the command line.

Usage Considerations

open

An open subroutine call specifying the lpfk special file is processed normally except that the Oflag and Mode parameters are ignored. An open request is rejected if the special file is already opened or if a kernel extension attempts to open the lpfk special file. All LPFK inputs are flushed following an open call until an input ring is established.

read and write

The lpfk special file does not support read or write subroutine calls. Instead, input data is obtained from the LPFKs through the input ring. The read and write subroutine calls behave the same as read and write functions of the /dev/null file. See "LFT Input Ring" in AIX® Version 7.1 Kernel Extensions and Device Support Programming Concepts for how to use the input ring.

ioctl

The lpfk special file supports the following ioctl operations:

Item Description
IOCINFO Returns the devinfo structure.
LPFKREGRING Registers input ring.
LPFKRFLUSH Flushes input ring.
LPFKLIGHT Sets key lights.

Error Codes

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

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

Files

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