home *** CD-ROM | disk | FTP | other *** search
- /*
- #### # # # #
- # # # # # The FreeWare C library for
- # # ## ### # # # # ### RISC OS machines
- # # # # # # # # # # # ___________________________________
- # # #### ### ## # # # #
- # # # # # # # # # # Please refer to the accompanying
- #### ### #### # # ##### # ### documentation for conditions of use
- ________________________________________________________________________
-
- File: Kbd.h
- Author: Copyright © 1993 Jason Williams
- Version: 1.00 (14 May 1993)
- Purpose: Reading from the keyboard
- */
-
-
- #ifndef __dl_kbd_h
- #define __dl_kbd_h
-
- #ifndef __dl_core_h
- #include "core.h"
- #endif
-
-
- /* Kbd_Keydown(keynum)
- * Checks to see if the given key is currently depressed.
- * 'keynum' is a negative INKEY number (as defined below)
- * Generally, it's use is for things like (eg) checking if CTRL is held
- * down when a click is made, as in:
- * if (Kbd_KeyDown(inkey_CTRL)) ...
- */
- extern BOOL Kbd_KeyDown(int keynum);
-
-
- /* In the DeskTop environment, you shouldn't ever need to read more than the
- * the following keys via this method (everything else should come in via WIMP
- * events). If you need other values, look up the Appendix on INKEY values
- * in the BBC BASIC Guide (mine has this on page 411)
- */
-
- typedef enum
- {
- inkey_ADJUST = -12, /* MOUSE 'Adjust' button */
- inkey_MENU = -11, /* MOUSE 'Menu' button */
- inkey_SELECT = -10, /* MOUSE 'Select' button */
-
- inkey_RALT = -9, /* Right ALT key */
- inkey_LALT = -6, /* Left ALT key */
- inkey_ALT = -3, /* Either/Both ALT keys */
-
- inkey_RCTRL = -8, /* Right CTRL key */
- inkey_LCTRL = -5, /* Left CTRL key */
- inkey_CTRL = -2, /* Either/Both CTRL keys */
-
- inkey_RSHIFT = -7, /* Right SHIFT key */
- inkey_LSHIFT = -4, /* Left SHIFT key */
- inkey_SHIFT = -1 /* Either/Both SHIFT keys */
- } kbd_neginkey;
-
- #endif
-