home *** CD-ROM | disk | FTP | other *** search
- /* Kbd.c */
- /*
-
- ##### # #
- # # # # #
- # # #
- # ## #### #### # ## ####
- # # # # # # # # # #
- # # # # # ### # # # #
- # # # # # # # # # #
- # ### # # # #### ##### ### ####
-
- -----------------------------------------------------------------------------
-
- This is source for use with the 'DeskLib' Wimp C programming library for
- Risc OS. I currently use v1.04 of DeskLib. This source is FreeWare, which
- means you can use it to write commercial applications, but you may not charge
- *in any way* for the distribution of this source. I (Tim Browse) retain
- all copyright on this source.
-
- This source is provided 'as is' and I offer no guarantees that is useful,
- bug-free, commented, that it will compile, or even that it exists.
-
- If it breaks in half, you own both pieces.
-
- All source © Tim Browse 1993
-
- -----------------------------------------------------------------------------
-
- */
-
- /* RISCOS_Lib includes */
- #include "os.h"
- #include "swis.h"
-
- /* Glazier includes */
- #include "stdhdr.h"
-
- #include "Kbd.h"
-
-
- BOOL Kbd_PollAlt(void)
- {
- os_regset regs;
-
- regs.r[0] = 129; /* Read kbd for info - see PRM p498 */
- regs.r[1] = 2 ^ 0xFF; /* 5 is the internal key code of the left hand ALT key */
- regs.r[2] = 0xFF;
-
- os_swix(OS_Byte, ®s);
-
- return (regs.r[1] == 0xFF);
- }
-
-