home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / !DeskLib / h / Kbd < prev    next >
Encoding:
Text File  |  1993-05-13  |  2.4 KB  |  62 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Kbd.h
  12.     Author:  Copyright © 1993 Jason Williams
  13.     Version: 1.00 (14 May 1993)
  14.     Purpose: Reading from the keyboard
  15. */
  16.  
  17.  
  18. #ifndef __dl_kbd_h
  19. #define __dl_kbd_h
  20.  
  21. #ifndef __dl_core_h
  22. #include "core.h"
  23. #endif
  24.  
  25.  
  26.   /*  Kbd_Keydown(keynum)
  27.    *  Checks to see if the given key is currently depressed.
  28.    *  'keynum' is a negative INKEY number (as defined below)
  29.    *  Generally, it's use is for things like (eg) checking if CTRL is held
  30.    *  down when a click is made, as in:
  31.    *    if (Kbd_KeyDown(inkey_CTRL)) ...
  32.    */
  33. extern BOOL Kbd_KeyDown(int keynum);
  34.  
  35.  
  36. /*  In the DeskTop environment, you shouldn't ever need to read more than the
  37.  *  the following keys via this method (everything else should come in via WIMP
  38.  *  events). If you need other values, look up the Appendix on INKEY values
  39.  *  in the BBC BASIC Guide (mine has this on page 411)
  40.  */
  41.  
  42. typedef enum
  43. {
  44.   inkey_ADJUST       = -12,                       /* MOUSE 'Adjust' button   */
  45.   inkey_MENU         = -11,                       /* MOUSE 'Menu' button     */
  46.   inkey_SELECT       = -10,                       /* MOUSE 'Select' button   */
  47.  
  48.   inkey_RALT         = -9,                        /* Right ALT key           */
  49.   inkey_LALT         = -6,                        /* Left ALT key            */
  50.   inkey_ALT          = -3,                        /* Either/Both ALT keys    */
  51.  
  52.   inkey_RCTRL        = -8,                        /* Right CTRL key          */
  53.   inkey_LCTRL        = -5,                        /* Left CTRL key           */
  54.   inkey_CTRL         = -2,                        /* Either/Both CTRL keys   */
  55.  
  56.   inkey_RSHIFT       = -7,                        /* Right SHIFT key         */
  57.   inkey_LSHIFT       = -4,                        /* Left SHIFT key          */
  58.   inkey_SHIFT        = -1                         /* Either/Both SHIFT keys  */
  59. } kbd_neginkey;
  60.  
  61. #endif
  62.