home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / jed098-4.zip / JED / DOC / PC-KEYS.TXT < prev    next >
Text File  |  1997-02-01  |  4KB  |  122 lines

  1. %% Key codes returned for most Alt keys and Control-keypad keys
  2. %% The ALT key definitions assume that the global variable ALT_CHAR is 0.
  3. %% The default value of ALT_CHAR is 27 which means that if you want to
  4. %% use the values presented below, you will have to set ALT_CHAR to 0 in
  5. %% your jed.rc file.
  6.  
  7. %% example:  define Alt-1 to goto top of buffer (bob):
  8. %%
  9. %%     setkey ("bob",  "^@x");
  10. %%
  11. %% For other keys, use this function to find out what they represent:
  12. %%
  13. define ibmpc_showkey()
  14. {
  15.    variable c, ch, key = Null_String;
  16.    variable timeout = 50;  % 5 seconds
  17.    
  18.    flush ("Press key:");
  19.    
  20.    while (input_pending(timeout))
  21.      {
  22.     timeout = 0;
  23.     c = getkey();
  24.     if (c == 0) ch = "^@"; 
  25.     else 
  26.       {
  27.          if (c == 224) ch = "\\xE0";
  28.          else if (c > 127) ch = strcat ("\\d", string (c));
  29.          else ch = char (c);
  30.       }
  31.     key = strcat(key, ch);
  32.      }
  33.    % insert (key);
  34.    message (key);
  35. }
  36.  
  37.  
  38. % Alt-1    ^@x
  39. % Alt-2    ^@y 
  40. % Alt-3    ^@z
  41. % Alt-4    ^@{
  42. % Alt-5    ^@|
  43. % Alt-6    ^@}
  44. % Alt-7    ^@~
  45. % Alt-8    ^@
  46. % Alt-A    ^@^^
  47. % Alt-B    ^@0
  48. % Alt-C    ^@.
  49. % Alt-D    ^@ SPACE
  50. % Alt-E    ^@^R
  51. % Alt-F    ^@!
  52. % Alt-G    ^@\"
  53. % Alt-H    ^@#
  54. % Alt-I    ^@^W
  55. % Alt-J    ^@$
  56. % Alt-K    ^@%
  57. % Alt-L    ^@&
  58. % Alt-M    ^@2
  59. % Alt-N    ^@1
  60. % Alt-O    ^@^X
  61. % Alt-P    ^@^Y
  62. % Alt-Q    ^@^P
  63. % Alt-R    ^@^S
  64. % Alt-S    ^@^_ 
  65. % Alt-T    ^@^T
  66. % Alt-U    ^@^V
  67. % Alt-V    ^@/
  68. % Alt-W    ^@^Q
  69. % Alt-X    ^@-
  70. % Alt-Y    ^@^U
  71. % Alt-Z    ^@,
  72. %
  73. % These are the 6 keys on the small keypad + 4 Arrow keys below
  74. %   Key         No-modifier     Ctrl        Shift        Alt
  75. % -------------------------------------------------------------
  76. %  Home           \xE0G        \xE0w        \xE00     ^@\d151
  77. %  Up             \xE0H        \xE0\d141    \xE01     ^@\d152
  78. %  PgUp           \xE0I        \xE0\d132    \xE02     ^@\d153
  79. %  Left           \xE0K        \xE0s        \xE03     ^@\d155
  80. %  Right          \xE0M        \xE0t        \xE04     ^@\d157
  81. %  End            \xE0O        \xE0u        \xE05     ^@\d159
  82. %  Down           \xE0P        \xE0\d145    \xE06     ^@\d160
  83. %  PgDn           \xE0Q        \xE0v        \xE07     ^@\d161
  84. %  Insert         \xE0R        \xE0\d146    \xE08     ^@\d162
  85. %  Delete         \xE0S        \xE0\d147    \xE09     ^@\d163
  86.  
  87. % These keys are located on the numeric keypad
  88. %   Key         No-modifier     Ctrl        Shift        Alt
  89. % -------------------------------------------------------------
  90. %  End           Oq          ^@u
  91. %  Insert        Op          ^@\d146
  92. %  Home          Ow          ^@w
  93. %  Delete        On          ^@\d147
  94. %  PgUP          Oy          ^@\d132
  95. %  PgDn          Os          ^@v
  96. %  Left          Ot          ^@s
  97. %  Right         Ov          ^@t
  98. %  Up            Ox          ^@\d141
  99. %  Down          Or          ^@\d145
  100. %  Five          Ou          ^@\d143
  101. %  Slash         OQ          ^@\d149       OQ      ^@\d164
  102. %  Star          OR          ^@\d150       OR      ^@7
  103. %  Minus         OS          ^@\d142       OS      ^@J
  104. %  Plus          Om          ^@\d144       Om      ^@N
  105. %  Enter         OM                        OM      ^@\d166
  106. %   Key         No-modifier     Ctrl        Shift        Alt
  107. % -------------------------------------------------------------
  108. %   F1:           ^@;           ^@^          ^@T         ^@h
  109. %   F2:           ^@<           ^@_          ^@U         ^@i
  110. %   F3:           ^@=           ^@`          ^@V         ^@j
  111. %   F4:           ^@>           ^@a          ^@W         ^@k
  112. %   F5:           ^@?           ^@b          ^@X         ^@l
  113. %   F6:           ^@@           ^@c          ^@Y         ^@m
  114. %   F7:           ^@A           ^@d          ^@Z         ^@n
  115. %   F8:           ^@B           ^@e          ^@[         ^@o
  116. %   F9:           ^@C           ^@f          ^@\         ^@p
  117. %   F10:          ^@D           ^@g          ^@]         ^@q
  118. %   F11:          ^@\d133       ^@\d137      ^@\d135     ^@\d139
  119. %   F12:          ^@\d134       ^@\d136      ^@\d136     ^@\d140
  120.