United States-English |
|
|
HP-UX Reference > Hhilkbd(7)HP-UX 11i Version 3: February 2007 |
|
NAMEhilkbd — HP-HIL mapped keyboard driver DESCRIPTIONHP-HIL, the Hewlett-Packard Human Interface Link, is the Hewlett-Packard standard for interfacing a personal computer, terminal, or workstation to its input devices. hilkbd supplies input from all mapped keyboards on a specified HP-HIL link. hilkbd returns mapped keycodes, not ASCII characters. "Raw" keycodes are the individual key downstrokes and upstrokes, and are different for each type of keyboard. hilkbd maps the raw input into the keycodes and protocol expected by the HP-UX, Pascal Workstation, and BASIC/UX operating systems. The hil driver can usurp a keyboard from hilkbd by changing it from mapped mode to raw mode. System Callsopen() gives exclusive access to the keyboard. If there is an ITE (internal terminal emulator) associated with the keyboard, the ITE loses input from the keyboard until the keyboard device is closed. Any previous queued input for the keyboard device is flushed from the input queue. close() returns control of the keyboard to the ITE, if present. Any unread input is discarded at that time. read() returns data from the keyboard in time-stamped packets: unsigned char time_stamp[4]; unsigned char status; unsigned char data; time_stamp, when repacked into an integer data type of four or more bytes, specifies the time since an arbitrary point in the past (for example, system start-up time). This point does not change between packets, but time during a power failure may or may not be counted. The time is in units of tens of milliseconds. The status byte encodes the state of the keyboard Shift and Ctrl keys:
The data byte contains the actual keystroke. If the file status flag O_NDELAY is set, read() returns 0 instead of blocking, when no data is available. The read() system call on an HP-HIL keyboard is considered "slow"; that is, it can be interrupted by caught signals (see signal(2)). write() is not supported by hilkbd. select() can be used to poll for input to read from hilkbd devices. select() for write or for exceptional conditions always returns a false indication in the bit masks. ioctl() is used to perform special operations on the device. ioctl() system calls have the form: int ioctl(int fildes, int request, char *arg); The following hilkbd request codes are defined in <sys/hilioctl.h>:
|
Printable version | ||
|