C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Keyboard Shift Codes (SHIFT.H)
                                             Up Contents Index Back
─────C/C++ Language─────────────────────────────────────────────────────────
 
  /* SHIFT.H - Constants for keyboard shift codes. Can be combined
   * with <|.>
   */
 
  /* Values in the low shift byte found at:
   *  AL returned by BIOS function 16, service 02h or service 12h
   *  Low byte returned by DOS _bios_keybrd( _KEYBRD_SHIFTSTATUS );
   *                           _bios_keybrd( _NKEYBRD_SHIFTSTATUS );
   *  Byte at 0:417h in low memory
   */
  #define shiftRSHIFT      0x0001  // 00000001   Right SHIFT down
  #define shiftLSHIFT      0x0002  // 00000010   Left SHIFT down
  #define shiftSHIFT       0x0003  // 00000011   Either SHIFT down
  #define shiftCTRL        0x0004  // 00000100   CTRL down
  #define shiftALT         0x0008  // 00001000   ALT down
  #define shiftSCROLLON    0x0010  // 00010000   SCROLL LOCK active
  #define shiftNUMON       0x0020  // 00100000   NUM LOCK active
  #define shiftCAPSON      0x0040  // 01000000   CAPS LOCK active
  #define shiftINS         0x0080  // 10000000   INS active
 
  /* Values in the high shift byte found at:
   *  AH returned by BIOS function 16h, service 12h
   *  High byte returned by DOS _bios_keybrd( _NKEYBRD_SHIFTSTATUS );
   */
  #define shiftLCTRL       0x0100  // 00000001   Left CTRL down
  #define shiftLALT        0x0200  // 00000010   Left ALT down
  #define shiftRCTRL       0x0400  // 00000100   Right CTRL down
  #define shiftRALT        0x0800  // 00001000   Right ALT down
  #define shiftSCROLLDOWN  0x1000  // 00010000   SCROLL LOCK down
  #define shiftNUMDOWN     0x2000  // 00100000   NUM LOCK down
  #define shiftCAPSDOWN    0x4000  // 01000000   CAPS LOCK down
  #define shiftSYSREQ      0x8000  // 10000000   SYSREQ down
 
  /* Values at byte at 0:418h in low memory are similar */
  #define lowmLALT         0x01    // 00000001   Left CTRL down
  #define lowmRCTRL        0x02    // 00000010   Left ALT down
  #define lowmSYSREQ       0x04    // 00000100   SYSREQ down
  #define lowmHOLD         0x08    // 00001000   CTRL NUM LOCK or
                                                 PAUSE down
  #define lowmSCROLLDOWN   0x10    // 00010000   SCROLL LOCK down
  #define lowmNUMDOWN      0x20    // 00100000   NUM LOCK down
  #define lowmCAPSDOWN     0x40    // 01000000   CAPS LOCK down
  #define lowmINS          0x80    // 10000000   INS down
                                    -♦-