home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Telnet 2.7b5 / source / Screens / vskeys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-09  |  5.0 KB  |  135 lines  |  [TEXT/CWIE]

  1. /*
  2.  *        %W%    (NCSA)    %G%
  3.  *
  4.  *      Virtual Screen Kernel Keys and Attribute Definitions
  5.  *  
  6.  *    National Center for Supercomputing Applications
  7.  *      by Gaige B. Paulsen
  8.  *
  9.  *      This file contains equates used by the program for specification of
  10.  *  special Keyboard characters and definition of the Attribute byte.
  11.  *
  12.  *      Version Date    Notes
  13.  *      ------- ------  ---------------------------------------------------
  14.  *      0.01    861102  Initial coding -GBP
  15.  *        2.1        871130    NCSA Telnet 2.1 -GBP
  16.  *        2.2     880715    NCSA Telnet 2.2 -GBP
  17.  *
  18.  */
  19.  
  20. /* internal codes for identifying special keys */
  21.  
  22. #define VSF10     96        /* Function key 10 */        /* Mac Key F5 */    /* BYU 2.4.12 */
  23. #define VSF11     97        /* Function key 11 */        /* Mac Key F6 */    /* BYU 2.4.12 */
  24. #define VSF12     98        /* Function key 12 */        /* Mac Key F7 */    /* BYU 2.4.12 */
  25. #define VSF8     99        /* Function key  8 */        /* Mac Key F3 */    /* BYU 2.4.12 */
  26. #define VSF13    100        /* Function key 13 */        /* Mac Key F8 */    /* BYU 2.4.12 */
  27. #define VSF14    101        /* Function key 14 */        /* Mac Key F9 */    /* BYU 2.4.12 */
  28. #define VSF16    103        /* Function key 16 */        /* Mac Key F11 */    /* BYU 2.4.12 */
  29. #define VSF18    105        /* Function key 18 */        /* Mac Key F13 */    /* BYU 2.4.12 */
  30. #define VSF19    107        /* Function key 19 */        /* Mac Key F14 */    /* BYU 2.4.12 */
  31. #define VSF15    109        /* Function key 15 */        /* Mac Key F10 */    /* BYU 2.4.12 */
  32. #define VSF17    111        /* Function key 17 */        /* Mac Key F12 */    /* BYU 2.4.12 */
  33. #define VSF20    113        /* Function key 20 */        /* Mac Key F15 */    /* BYU 2.4.12 */
  34. #define VSHELP    114        /* Help */                                        /* BYU 2.4.12 */
  35. #define VSHOME    115        /* Home */                                        /* BYU 2.4.12 */
  36. #define VSPGUP    116        /* Page up */                                    /* BYU 2.4.12 */
  37. #define VSDEL    117        /* Del */                                        /* BYU 2.4.12 */
  38. #define VSF9    118        /* Function key  9 */        /* Mac Key F4 */    /* BYU 2.4.12 */
  39. #define VSEND    119        /* End */                                        /* BYU 2.4.12 */
  40. #define VSF7    120        /* Function key  7 */        /* Mac Key F2 */    /* BYU 2.4.12 */
  41. #define VSPGDN    121        /* Page down */                                    /* BYU 2.4.12 */
  42. #define VSF6    122        /* Function key  6 */        /* Mac Key F1 */    /* BYU 2.4.12 */
  43.  
  44. /* Following group is the "Cursor Control" keys */
  45. #define VSUP    129     /* Up Arrow */
  46. #define VSDN    130     /* Down Arrow */
  47. #define VSRT    131     /* Right Arrow */
  48. #define VSLT    132     /* Left Arrow */
  49.  
  50. /* Following group is the "Auxilliary Keypad" keys */
  51. #define VSK0    133     /* Keypad 0 */
  52. #define VSK1    134     /* Keypad 1 */
  53. #define VSK2    135     /* Keypad 2 */
  54. #define VSK3    136     /* Keypad 3 */
  55. #define VSK4    137     /* Keypad 4 */
  56. #define VSK5    138     /* Keypad 5 */    
  57. #define VSK6    139     /* Keypad 6 */    
  58. #define VSK7    140     /* Keypad 7 */    
  59. #define VSK8    141     /* Keypad 8 */    
  60. #define VSK9    142     /* Keypad 9 */
  61. #define VSKC    143     /* Keypad , */
  62. #define VSKM    144     /* Keypad - */
  63. #define VSKP    145     /* Keypad . */
  64. #define VSKE    146     /* Keypad Enter */
  65.  
  66. #define VSF1    147     /* Function 1 */            /* Mac Keypad Clear */    
  67. #define VSF2    148     /* Function 2 */            /* Mac Keypad = */    
  68. #define VSF3    149     /* Function 3 */            /* Mac Keypad / */    
  69. #define VSF4    150     /* Function 4 */            /* Mac Keypad * */    
  70.  
  71.  
  72.  
  73.  
  74. #ifdef VSMASTER
  75. char VSIkpxlate[2][23] =
  76.     {    "ABCD0123456789,-.\15PQRS",
  77.         "ABCDpqrstuvwxylmnMPQRS"
  78.     };
  79. char VSIkpxlate2[] = "222122?2?3?3?2?3?3123425161";        /* BYU 2.4.12 */
  80. char VSIkpxlate3[] = "134956?9?2?3?8?1?4~~~~0~8~7";        /* BYU 2.4.12 */
  81. unsigned char VSIkplen[] =                                 /* BYU 2.4.12 */
  82.     { 5,5,5,5,5,5,5,5,5,5,                                /* BYU 2.4.12 */
  83.       5,5,5,5,5,5,5,5,4,4,                                /* BYU 2.4.12 */
  84.       4,4,5,4,5,4,5 };                                    /* BYU 2.4.12 */
  85. #else
  86. extern char *VSIkpxlate,*VSIkpxlate2,*VSIkpxlate2;        /* BYU 2.4.12 */
  87. extern unsigned char *VSIkplen;                            /* BYU 2.4.12 */
  88. #endif
  89.  
  90. /*
  91.  *          Definition of attribute bits in the Virtual Screen
  92.  *
  93.  *          0   -   Bold
  94.  *          1   -   
  95.  *          2   -
  96.  *          3   -   Underline
  97.  *          4   -   Blink
  98.  *          5   -
  99.  *          6   -   Reverse
  100.  *          7   -   Graphics character set
  101.  *            8    -    bit 0 of ansi foreground color index
  102.  *            9    -    bit 1 of ansi foreground color index
  103.  *            10    -    bit 2 of ansi foreground color index
  104.  *            11    -    use ansi foreground color
  105.  *            12    -    bit 0 of ansi background color index
  106.  *            13    -    bit 1 of ansi background color index
  107.  *            14    -    bit 2 of ansi background color index
  108.  *            15    -    use ansi background color
  109.  *
  110.  */
  111. #define VSa(x)            ( 1 << ((x)-1) )    
  112. #define VSisbold(x)     ((x) & 0x01)
  113. #define VSisundl(x)     ((x) & 0x08)
  114. #define VSisblnk(x)     ((x) & 0x10)
  115. #define VSisrev(x)      ((x) & 0x40)
  116. #define VSisgrph(x)     ((x) & 0x80)
  117. #define VSinattr(x)     ((x) & 0xff)    
  118.  
  119. #define VSgraph(x)      ((x) | 0x80)
  120. #define VSnotgraph(x)     ((x) & 0x7F)
  121.  
  122. #define VSisansifg(x)     ((x) & 0x0800)    
  123. #define VSisansibg(x)     ((x) & 0x8000)    
  124. #define VSisansi(x)        ((x) & 0x8800)    
  125.  
  126. //#define VSisbold(x) (x & 0x01)
  127. //#define VSisundl(x) (x & 0x08)
  128. //#define VSisblnk(x) (x & 0x10)
  129. //#define VSisrev(x)  (x & 0x40)
  130. //#define VSisgrph(x) (x & 0x80)
  131. //#define VSinattr(x) (x & 0xd9)
  132.  
  133. //#define VSgraph(x)  (x | 0x80)
  134. //#define VSnotgraph(x) (x & 0x7F)
  135.