HPUX hilkbd[7]






 hilkbd(7)                   Series 700/800 Only                   hilkbd(7)





 NAME
      hilkbd - HP-HIL mapped keyboard driver

 DESCRIPTION
      HP-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(7) driver can usurp a keyboard
      from hilkbd by changing it from mapped mode to raw mode.

    System Calls
      open(2) 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(2) returns control of the keyboard to the ITE, if present.  Any
      unread input is discarded at that time.

      read(2) 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 (e.g.,
      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:

           lB l.  0x8X shift and control 0x9X control only 0xAX shift only
           0xBX no shift or control

      The data byte contains the actual keystroke.

      If the file status flag O_NDELAY is set, read(2) returns 0 instead of
      blocking, when no data is available.  The read(2) system call on an
      HP-HIL keyboard is considered "slow"; that is, it can be interrupted
      by caught signals (see signal(2)).




 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 hilkbd(7)                   Series 700/800 Only                   hilkbd(7)





      write(2) is not supported by hilkbd.

      select(2) can be used to poll for input to read from hilkbd devices.
      select(2) for write or for exceptional conditions always returns a
      false indication in the bit masks.

      ioctl(2) is used to perform special operations on the device.
      ioctl(2) system calls have the form:

           int ioctl(int fildes, int request, char *arg);

      The following hilkbd request codes are defined in <sys/hilioctl.h>:

      KBD_READ_CONFIG
                     Read the configuration code.

                     This request returns a one-byte configuration code in
                     the char variable to which arg points.  This contains a
                     field, defined by KBD_IDCODE_MASK, which specifies the
                     keyboard identification code.  The possible values of
                     this field are defined in the header file, and this
                     identification code affects interpretation of the
                     language code.  All other fields in the configuration
                     code are currently undefined.

      KBD_READ_LANGUAGE
                     Read the language code.

                     This request returns a one-byte language code, as read
                     from the keyboard, in the char variable to which arg
                     points.  If there is more than one keyboard, the
                     language is taken from the first keyboard on the link.
                     Interpretation of the language code is affected by the
                     keyboard identification field within the configuration
                     code.

      KBD_STATUS     Read the keyboard status register.

                     This request returns a one-byte value containing bit
                     flags specifying the state of the shift and control
                     keys in the char variable to which arg points:

                     center tab(@); l l.  KBD_STAT_LEFTSHIFT@The left shift
                     key is up KBD_STAT_RIGHTSHIFT@The right shift key is up
                     KBD_STAT_SHIFT@Both shift keys are up KBD_STAT_CTRL@The
                     control key is up

                     Other bits are undefined.

      KBD_REPEAT_RATE
                     Set the keyboard auto-repeat rate.



 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992






 hilkbd(7)                   Series 700/800 Only                   hilkbd(7)





                     The one-byte value to which arg points is the negative
                     of the repeat period, in tens of milliseconds.  The
                     repeat rate is the reciprocal of the repeat period.  A
                     parameter of zero disables auto-repeat.

      KBD_REPEAT_DELAY
                     Set the keyboard auto-repeat delay.

                     The one-byte value to which arg points is the negative
                     of the repeat delay, in tens of milliseconds.

      KBD_BEEP       Cause an audible beep.

                     The one-byte value to which arg points specifies the
                     volume of the beep, within the range 0 through
                     KBD_MAXVOLUME.  Implementations with fewer than
                     KBD_MAXVOLUME discrete levels of volume will scale the
                     parameter into the smaller range.

 ERRORS
      [EINVAL]       An invalid parameter was detected by ioctl(2).

      [EINTR]        A signal was caught during a read(2) system call.

      [ENXIO]        No keyboard is present on the HP-HIL link specified by
                     the minor number.

      [ENODEV]       An attempt was made to use write(2) using hilkbd.

      [EBUSY]        The device is already open.

 AUTHOR
      hilkbd was developed by the Hewlett-Packard Company.

 FILES
      /dev/hilkbd*

 SEE ALSO
      termio(7), hil(7), mknod(1M), select(2), signal(2).















 Hewlett-Packard Company            - 3 -     HP-UX Release 9.0: August 1992