home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / d / ddx-mips.zip / MIPSKBD.H < prev    next >
C/C++ Source or Header  |  1992-07-31  |  3KB  |  86 lines

  1. /*
  2.  * $XConsortium$
  3.  *
  4.  * Copyright 1991 MIPS Computer Systems, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of MIPS not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  MIPS makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * MIPS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL MIPS
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23. /* $Header: mipsKbd.h,v 1.4 91/07/12 11:43:56 dd Exp $ */
  24. #ifndef __DDX_MIPSKBD_H
  25. #define    __DDX_MIPSKBD_H
  26.  
  27. #define DEFAULT_KEYBOARD    -1
  28. #define XT_KEYBOARD        0
  29. #define AT_KEYBOARD        1
  30. #define UNIX1_KEYBOARD        2
  31.  
  32. /* mod defines */
  33.  
  34. #define MC    (ControlMask)
  35. #define MS    (ShiftMask)
  36. #define ML    (LockMask)
  37. #define M1    (Mod1Mask)
  38.  
  39. /* keyboard device name */
  40.  
  41. #define    KEYDEV        "/dev/keybd"
  42.  
  43. /* led commands */
  44.  
  45. #define LEDupdate    0    /* Update leds */
  46. #define LEDreset    1    /* Reset leds */
  47. #define LEDScrollLock    2    /* Scroll lock light on/off */
  48. #define LEDCapsLock    3    /* Caps lock light on/off */
  49. #define LEDNumLock    4    /* Num lock light on/off */
  50. #define LED1        5    /* xled1 light on/off */
  51. #define LED2        6    /* xled2 light on/off */
  52. #define LED3        7    /* xled3 light on/off */
  53.  
  54. /* keyboard private structure */
  55.  
  56. typedef
  57. struct  _keybdPriv {
  58.     int        fd;
  59.     short    unit;        /* which keyboard */
  60.     short    cap;        /* Device capabilities */
  61.     short    type;        /* keyboard type */
  62. } KeybdPriv, *KeybdPrivPtr;
  63.  
  64. typedef struct {
  65.     KeySymsRec    keySyms;
  66.     CARD8    *modMap;
  67.     int        offset;
  68.     void    (*keybdEvent) ();
  69. } KeybdType_t;
  70.  
  71. /* keyboard defines */
  72.  
  73. extern KeybdPriv    keybdPriv;
  74. extern KeybdType_t    keybdType[];
  75. extern void        xtKeybdEvent();
  76. extern void        atKeybdEvent();
  77. extern void        unix1KeybdEvent();
  78. extern KeySym        xt_KeyMap[];
  79. extern CARD8        xt_ModMap[];
  80. extern KeySym        at_KeyMap[];
  81. extern CARD8        at_ModMap[];
  82. extern KeySym        unix1_KeyMap[];
  83. extern CARD8        unix1_ModMap[];
  84.  
  85. #endif /* __DDX_MIPSKBD_H */
  86.