home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff291.lzh / Keyboard / Keyboard.h < prev    next >
C/C++ Source or Header  |  1989-12-12  |  2KB  |  76 lines

  1. /* Keyboard.h
  2.  
  3.    by Fabbian G. Dufoe, III
  4.    This is a public domain program.  You may use it any way you like.
  5.  
  6.    This file contains function prototypes and definitions for using the
  7.    functions in Keyboard.c.  If your compiler does not support function
  8.    prototypes you must define the preprocessor symbol "__NOPROTO" to compile
  9.    programs using this file.
  10. */
  11.  
  12. #include <dos.h>
  13.  
  14. #ifndef INTUITION_INTUITION_H
  15. #include <intuition/intuition.h>
  16. #endif
  17.  
  18. #ifndef KEYBOARD_H
  19. #define KEYBOARD_H TRUE
  20.  
  21. #define K_UP      301   /* Arrow keys */
  22. #define K_DOWN    302
  23. #define K_RIGHT   303
  24. #define K_LEFT    304
  25. #define K_S_UP    305   /* Shifted arrow keys */
  26. #define K_S_DOWN  306
  27. #define K_S_RIGHT 307
  28. #define K_S_LEFT  308
  29. #define K_HELP    309   /* Help key */
  30. #define K_F1      331   /* Function keys F1-F10 */
  31. #define K_F2      332
  32. #define K_F3      333
  33. #define K_F4      334
  34. #define K_F5      335
  35. #define K_F6      336
  36. #define K_F7      337
  37. #define K_F8      338
  38. #define K_F9      339
  39. #define K_F10     340
  40. #define K_S_F1    341   /* Shifted function keys F1-F10 */
  41. #define K_S_F2    342
  42. #define K_S_F3    343
  43. #define K_S_F4    344
  44. #define K_S_F5    345
  45. #define K_S_F6    346
  46. #define K_S_F7    347
  47. #define K_S_F8    348
  48. #define K_S_F9    349
  49. #define K_S_F10   350
  50.  
  51.  
  52. /* Prototypes for functions defined in Keyboard.c */
  53.  
  54. #ifndef __NOPROTO
  55. #ifndef __PROTO
  56. #define __PROTO(a) a
  57. #endif
  58. #else
  59. #ifndef __PROTO
  60. #define __PROTO(a) ()
  61. #endif
  62. #endif
  63.  
  64. void CloseReadConsole __PROTO((void));
  65. int DeadKeyConvert __PROTO((struct IntuiMessage *Message,
  66.                             unsigned char *KeyBuffer,
  67.                             int BufferSize,
  68.                             struct KeyMap *KeyMap));
  69. int OpenReadConsole __PROTO((void));
  70. char ReadKey __PROTO((struct IntuiMessage *Message,
  71.                       unsigned short *KeyID,
  72.                       struct KeyMap *KeyMap));
  73.  
  74.  
  75. #endif
  76.