home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff274.lzh / HP11 / kbd.h < prev    next >
C/C++ Source or Header  |  1989-11-16  |  714b  |  21 lines

  1. /* Define type Decoder which is a function with a short * argument and which
  2.   return an enum KeyTypes. These functions do the keyboard decoding for prefixes */
  3. typedef enum KeyTypes (*Decoder)(short *);
  4.  
  5. /* One key of the keyboard structure : */
  6. struct Key {
  7.    enum KeyTypes Sort; /* The type of key */
  8.    union { /* Different data for each type */
  9.       Decoder suffix; /* Prefix ==> decoder function */
  10.       LONG act; /* Action number */
  11.       LONG code; /* Instruction number */
  12.    } Data;
  13. };
  14.  
  15. /* These defines are done to simplify access to the components */
  16. #define Act Data.act
  17. #define Code Data.code
  18. #define Suffix Data.suffix
  19.  
  20. extern struct Key mainKbd[3 * NUMKEYS]; /* The main, f & g key sequences */
  21.