home *** CD-ROM | disk | FTP | other *** search
- /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
- | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
- | All Rights Reserved.
- |
- | This Library is part of IDC's TesSeRact Development Tools product
- | line. For information about other IDC products, call 1-215-443-9705.
- *-V--------------------------------------------------------------------*
- | $Header: tcxlkey.h 552.3 05 Apr 1991 16:32:04 $
- |
- | $Log: tcxlkey.h $
- *-D--------------------------------------------------------------------*
- | <TCXLkey.h> : Public definitions and prototypes for TCXL Keyboard
- | Access Subsystem (Bottom level).
- *-N-----------------------[ Notes and Caveats ]------------------------*
- | 1) Almost all of the keyboard-access functions are MS-DOS dependent.
- *======================================================================*/
- #ifndef _TCXLkey_
- # define _TCXLkey_ 1
- # ifndef _TCXLdef_
- # include <TCXLdef.h> /* input system */
- # endif
- #define KEY_BRK 0xFFFF /* ^Break return from _KeyHit()/_KeyGet() */
- /*- KeyStat() return bits (MS-DOS) -------*/
- #define KEY_RSH 0x01 /* [Right Shift] pressed */
- #define KEY_LSH 0x02 /* [Left Shift] pressed */
- #define KEY_CTL 0x04 /* [Ctrl] pressed */
- #define KEY_ALT 0x08 /* [Alt] pressed */
- #define KEY_SCR 0x10 /* [Scroll Lock] toggled */
- #define KEY_NUM 0x20 /* [Num Lock] toggled */
- #define KEY_CAP 0x40 /* [Caps Lock] toggled */
- #define KEY_INS 0x80 /* [Ins] toggled */
- /*- KctlFlg bits -------------------------*/
- #define KEY_EXT 0x80 /* Extended BIOS functions */
- #define KEY_FIX 0x40 /* Translate extended (default) */
- /*- KctlSrc bits -------------------------*/
- #define KEY_KBD 0x00 /* Keyboard */
- #define KEY_QUE 0x01 /* Key-queue */
- #define KEY_MOU 0x02 /* Mouse */
-
- /*------------------------[ Function prototypes ]-----------------------*/
-
- #ifdef __cplusplus /* no mangling, please */
- extern "C" {
- #endif
- /*- Keyboard access (MS-DOS) -------------*/
- WrdT PAS _KeySta(NOARG); /* Get keyboard status via BIOS */
- VOID PAS _KeySet(IntT b, IntT s); /* Toggle BIOS keyboard state */
- FlgT PAS _KeyExt(NOARG); /* Test for extended BIOS */
- KeyT PAS _KeyGet(NOARG); /* Get waiting key via BIOS */
- KeyT PAS _KeyHit(NOARG); /* Test for waiting key via BIOS */
- VOID KcapOff(NOARG); /* CapsLock ON */
- VOID KcapOn(NOARG); /* CapsLock OFF */
- VOID KinsOff(NOARG); /* Insert OFF */
- VOID KinsOn(NOARG); /* Insert ON */
- VOID KnumOff(NOARG); /* NumLock OFF */
- VOID KnumOn(NOARG); /* NumLock ON */
- BytT CTYP KscnCod(ChrT c); /* Return scan-code for ASCII */
- /*- Implementation macros ----------------*/
- #define KcapOff() (_KeySet(KEY_CAP, 0))
- #define KcapOn() (_KeySet(KEY_CAP, 1))
- #define KinsOff() (_KeySet(KEY_INS, 0))
- #define KinsOn() (_KeySet(KEY_INS, 1))
- #define KnumOff() (_KeySet(KEY_NUM, 0))
- #define KnumOn() (_KeySet(KEY_NUM, 1))
- #ifdef __cplusplus
- }
- #endif
- #endif /* _TCXLkey_ : End of TCXLkey.h -------------------------------*/