home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / EXTKEY.ZIP / EXTKEY.TXT < prev   
Encoding:
Text File  |  1988-02-09  |  2.8 KB  |  59 lines

  1. TP4 Unit: EXTKEY.PAS / Author: David Bennett / Date: 2-9-88 / Version 1.0
  2.  
  3. Released to the public domain. (Guilt Freeware)
  4.  
  5. This archive may be re-distributed with any Unit/Program that depends on it
  6. as long as the Unit/Program is also released to the public domain.
  7.  
  8. This turbo pascal unit allows you to access most of the extended keyboard
  9. values thru Turbo Pascal without using an INT 09h front end. The problem
  10. with the INT 9 front end routines is that they collide with certain TSR
  11. programs. One that used the INT 9 caused SideKick to "Chirp" without
  12. ever letting it become active. This unit allows me to access any of the
  13. extended keys that I really need to access anyway. Although this method
  14. is much more "primitive" than some of the other solutions, I was able to
  15. plan/write/debug it in a couple of hours and it works just fine.
  16.  
  17. The unit interface is as follows:
  18.  
  19. Constants - The following contants allow you to compare keys that are read
  20.             with the ExtendKey funtion. All constants are of type Word.
  21.  
  22.   Alt_A Alt_B Alt_C Alt_D Alt_E    UpKey         DownKey
  23.   Alt_F Alt_G Alt_H Alt_I Alt_J    LeftKey       RightKey
  24.   Alt_K Alt_L Alt_M Alt_N Alt_O    Ctrl_LeftKey  Ctrl_RightKey
  25.   Alt_P Alt_Q Alt_R Alt_S Alt_T    InsKey        DelKey
  26.   Alt_U Alt_V Alt_W Alt_X Alt_Y    HomeKey       EndKey
  27.   Alt_Z                            PageUp        PageDown
  28.                                    Ctrl_HomeKey  Ctrl_EndKey
  29.                                    Ctrl_PageUp   Ctrl_PageDown
  30.  
  31.   F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
  32.  
  33.   Shift_F1 Shift_F2 Shift_F3 Shift_F4 Shift_F5
  34.   Shift_F6 Shift_F7 Shift_F8 Shift_F9 Shift_F10
  35.  
  36.   Alt_F1 Alt_F2 Alt_F3 Alt_F4 Alt_F5 Alt_F6 Alt_F7 Alt_F8 Alt_F9 Alt_F10
  37.  
  38.   Ctrl_F1 Ctrl_F2 Ctrl_F3 Ctrl_F4 Ctrl_F5
  39.   Ctrl_F6 Ctrl_F7 Ctrl_F8 Ctrl_F9 Ctrl_F10
  40.  
  41. Variables - These to boolean values can be used to test for extended keys.
  42.  
  43.   ExtendedKey - This will be true if the last key read with ExtendKey
  44.                 was an extended key value. If not it will return false.
  45.                 This variable is always the opposite of ASCIIKey (Below).
  46.  
  47.   ASCIIKey    - This will be true if the last key read with ExtendKey
  48.                 was a regular ASCII value. If not it will return false.
  49.                 This variable is always the opposite of ExtendedKey (Above).
  50.  
  51. Functions - The only function implemented in this unit is ExtendKey. This is
  52.             the function that will allow you to read extended keyboard values.
  53.  
  54.   ExtendKey   - This function returns a keyboard code as type Word. If the
  55.                 key read was an extended key then the High Byte of the word
  56.                 will be $01. If the key read was a regular ASCII key the
  57.                 the High Byte will be $00. This function also maintains the
  58.                 two boolean variables ExtendedKey and ASCIIKey defined above.
  59.