qc.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.
Extended Key Codes (EXTEND.H)
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  /* EXTEND.H - Constants for extended key codes. Extended key codes
   * can be processed as two-byte codes using any of the following:
   *    Returned by C getch() and getche() functions
   *    Returned in AL by DOS function 21h, services 01h, 06h, 07h, or
   *    08h
   *    OS/2 KBDKEYINFO.chChar (set by KbdCharIn or KbdPeek)
   */
 
  enum EXTENDED
  {
      /* If a function key is pressed, the first byte of the two-byte
       * code will return one of the following:
       */
      extINTRO  = 0,          // For keys common to all keyboards
      extINTRO2 = 0xE0,       // For keypad and other keys unique to
                              //   101-key keyboard
 
      /* Second byte will be one of the following extended codes: */
 
      /* Numeric keypad */
      extUP    = 72,  extDOWN  = 80,  extLEFT  = 75,  extRIGHT = 77,
      extPGUP  = 73,  extPGDN  = 81,  extHOME  = 71,  extEND   = 79,
      extINS   = 82,  extDEL   = 83,
 
      extCTRL_PRTSC = 114,
      extCTRL_LEFT  = 115, extCTRL_RIGHT = 116,
      extCTRL_PGUP  = 132, extCTRL_PGDN  = 118,
      extCTRL_HOME  = 119, extCTRL_END   = 117,
 
      NullKey = 3,  extSH_Tab = 15,
 
      /* ALT+letter keys */
      extALT_A = 30, extALT_B = 48, extALT_C = 46, extALT_D = 32,
      extALT_E = 18, extALT_F = 33, extALT_G = 34, extALT_H = 35,
      extALT_I = 23, extALT_J = 36, extALT_K = 37, extALT_L = 38,
      extALT_M = 50, extALT_N = 49, extALT_O = 24, extALT_P = 25,
      extALT_Q = 16, extALT_R = 19, extALT_S = 31, extALT_T = 20,
      extALT_U = 22, extALT_V = 47, extALT_W = 17, extALT_X = 45,
      extALT_Y = 21, extALT_Z = 44,
 
      /* extALT+number keys */
      extALT_1 = 120,  extALT_2, extALT_3, extALT_4, extALT_5,
      extALT_6,        extALT_7, extALT_8, extALT_9, extALT_0,
 
      extALT_minus = 130,  extALT_equals,
 
      /* Function keys */
      extF1  = 59,  extF2, extF3, extF4, extF5,
      extF6,        extF7, extF8, extF9, extF10,
      extF11 = 133, extF12,
 
      /* SHIFT+function keys */
      extSH_F1 = 84,  extSH_F2, extSH_F3, extSH_F4, extSH_F5,
      extSH_F6,       extSH_F7, extSH_F8, extSH_F9, extSH_F10,
      extSH_F11= 137, extSH_F12,
 
      /* CTRL+function keys */
      extCTRL_F1 = 94, extCTRL_F2,  extCTRL_F3, extCTRL_F4,
      extCTRL_F5,      extCTRL_F6,  extCTRL_F7, extCTRL_F8,
      extCTRL_F9,      extCTRL_F10, extCTRL_F11 = 137,
      extCTRL_F12,
 
      /* ALT+function keys */
      extALT_F1 = 104,  extALT_F2, extALT_F3, extALT_F4, extALT_F5,
      extALT_F6,        extALT_F7, extALT_F8, extALT_F9, extALT_F10,
      extALT_F11 = 139, extALT_F12,
  };
                                    -♦-