home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume33 / problem / part01 / keys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-19  |  3.5 KB  |  88 lines

  1. /*
  2. ** keys.h - contains definitions of all the keys which invoke commands.
  3. **
  4. ** keys.h 1.7   Delta'd: 17:26:33 10/7/92   Mike Lijewski, CNSF
  5. **
  6. ** Copyright (c) 1991, 1992 Cornell University
  7. ** All rights reserved.
  8. **
  9. ** Redistribution and use in source and binary forms are permitted
  10. ** provided that: (1) source distributions retain this entire copyright
  11. ** notice and comment, and (2) distributions including binaries display
  12. ** the following acknowledgement:  ``This product includes software
  13. ** developed by Cornell University'' in the documentation or other
  14. ** materials provided with the distribution and in all advertising
  15. ** materials mentioning features or use of this software. Neither the
  16. ** name of the University nor the names of its contributors may be used
  17. ** to endorse or promote products derived from this software without
  18. ** specific prior written permission.
  19. **
  20. ** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  21. ** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  22. ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  23. */
  24.  
  25. #ifndef __KEYS_H
  26. #define __KEYS_H
  27.  
  28. const char KEY_CTL_D = 4;       // forward half window - ASCII CTL-D
  29. const char KEY_CTL_U = 0x15;    // backward half window - ASCII CTL-U
  30. const char KEY_TOP   = '<';     // go to first line in listing
  31. const char KEY_BOT   = '>';     // go to last line in listing
  32. const char KEY_CTL_L = '\f';    // repaint screen -- CTR-L
  33. const char KEY_a     = 'a';     // append to current problem
  34. const char KEY_c     = 'c';     // close current problem
  35. const char KEY_d     = 'd';     // delete current problem
  36. const char KEY_e     = 'e';     // examine current problem
  37. const char KEY_l     = 'l';     // log new problem
  38. const char KEY_m     = 'm';     // examine current problem -- aka "more"
  39. const char KEY_q     = 'q';     // quit
  40. const char KEY_r     = 'r';     // reorganize the database for current area
  41. const char KEY_s     = 's';     // subscribe to a problem area
  42. const char KEY_u     = 'u';     // unsubscribe from a problem area
  43. const char KEY_v     = 'v';     // view problem summaries
  44. const char KEY_K     = 'K';     // keyword search over entire problem text
  45. const char KEY_M     = 'M';     // modify keywords
  46. const char KEY_R     = 'R';     // reopen a closed problem
  47. const char KEY_S     = 'S';     // save problem listing to file
  48. const char KEY_V     = 'V';     // print out version string
  49. const char KEY_BKSP  = '\b';    // backspace works as expected while in a prompt
  50. const char KEY_BANG  = '!';     // run shell command
  51. const char KEY_ESC   = 0x1B;    // for GNU Emacs compatibility -- ASCII-ESC
  52.  
  53. // display help
  54. const char KEY_QM    = '?';
  55. const char KEY_H     = 'H';
  56.  
  57. // forward one line
  58. const char KEY_j          = 'j';
  59. const char KEY_n          = 'n';
  60. const char KEY_CTL_N      = 0xE;   // ASCII CTL-N
  61. const char KEY_SPC        = ' ';
  62. const char KEY_CR         = '\r';  // carriage return
  63. const char KEY_ARROW_DOWN = 300;
  64.  
  65. // backward one line
  66. const char KEY_k        = 'k';  // or keyword search over problem headers
  67. const char KEY_p        = 'p';
  68. const char KEY_CTL_P    = 0x10; // ASCII CTL-P
  69. const char KEY_CTL_Y    = 0x19; // ASCII CTL-Y
  70. const char KEY_ARROW_UP = 301;
  71.  
  72. // forward one window
  73. const char KEY_CTL_F = 6;    // ASCII CTL-F
  74. const char KEY_CTL_V = 0x16; // ASCII CTL-V
  75.  
  76. // backward one window
  77. const char KEY_b     = 'b';
  78. const char KEY_CTL_B = 2;   // ASCII CTL-B
  79.  
  80. // abort from a prompt - CTL-G
  81. //
  82. // Can't use '\a' here due to some C compilers not recognizing this
  83. // as the terminal bell.
  84. //
  85. const char KEY_ABORT = 0x7;
  86.  
  87. #endif /* __KEYS_H */
  88.