home *** CD-ROM | disk | FTP | other *** search
- TP4 Unit: EXTKEY.PAS / Author: David Bennett / Date: 2-9-88 / Version 1.0
-
- Released to the public domain. (Guilt Freeware)
-
- This archive may be re-distributed with any Unit/Program that depends on it
- as long as the Unit/Program is also released to the public domain.
-
- This turbo pascal unit allows you to access most of the extended keyboard
- values thru Turbo Pascal without using an INT 09h front end. The problem
- with the INT 9 front end routines is that they collide with certain TSR
- programs. One that used the INT 9 caused SideKick to "Chirp" without
- ever letting it become active. This unit allows me to access any of the
- extended keys that I really need to access anyway. Although this method
- is much more "primitive" than some of the other solutions, I was able to
- plan/write/debug it in a couple of hours and it works just fine.
-
- The unit interface is as follows:
-
- Constants - The following contants allow you to compare keys that are read
- with the ExtendKey funtion. All constants are of type Word.
-
- Alt_A Alt_B Alt_C Alt_D Alt_E UpKey DownKey
- Alt_F Alt_G Alt_H Alt_I Alt_J LeftKey RightKey
- Alt_K Alt_L Alt_M Alt_N Alt_O Ctrl_LeftKey Ctrl_RightKey
- Alt_P Alt_Q Alt_R Alt_S Alt_T InsKey DelKey
- Alt_U Alt_V Alt_W Alt_X Alt_Y HomeKey EndKey
- Alt_Z PageUp PageDown
- Ctrl_HomeKey Ctrl_EndKey
- Ctrl_PageUp Ctrl_PageDown
-
- F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
-
- Shift_F1 Shift_F2 Shift_F3 Shift_F4 Shift_F5
- Shift_F6 Shift_F7 Shift_F8 Shift_F9 Shift_F10
-
- Alt_F1 Alt_F2 Alt_F3 Alt_F4 Alt_F5 Alt_F6 Alt_F7 Alt_F8 Alt_F9 Alt_F10
-
- Ctrl_F1 Ctrl_F2 Ctrl_F3 Ctrl_F4 Ctrl_F5
- Ctrl_F6 Ctrl_F7 Ctrl_F8 Ctrl_F9 Ctrl_F10
-
- Variables - These to boolean values can be used to test for extended keys.
-
- ExtendedKey - This will be true if the last key read with ExtendKey
- was an extended key value. If not it will return false.
- This variable is always the opposite of ASCIIKey (Below).
-
- ASCIIKey - This will be true if the last key read with ExtendKey
- was a regular ASCII value. If not it will return false.
- This variable is always the opposite of ExtendedKey (Above).
-
- Functions - The only function implemented in this unit is ExtendKey. This is
- the function that will allow you to read extended keyboard values.
-
- ExtendKey - This function returns a keyboard code as type Word. If the
- key read was an extended key then the High Byte of the word
- will be $01. If the key read was a regular ASCII key the
- the High Byte will be $00. This function also maintains the
- two boolean variables ExtendedKey and ASCIIKey defined above.