;***********************************************************************
;*                                                                     *
;* FIXKEY.ASP  (C) 1992 DATASTORM TECHNOLOGIES, INC.                   *
;*                                                                     *
;* An ASPECT script to fix the '|' and '\' key for U.K. keyboards      *
;* This script is for PROCOMM PLUS versions 2.01 and EC 2.01           *
;*                                                                     *
;* To run this script automatically with PCPLUS, rename FIXKEY.ASX to  *
;*    PROFILE.ASX  (type the following commands at the DOS prompt):    *
;*                                                                     *
;*         ASPCOMP FIXKEY.ASP                                          *
;*         RENAME FIXKEY.ASX PROFILE.ASX                               *
;*                                                                     *
;* When running this script:                                           *
;*    Use the '\' and '|' key as normal                                *
;*    Use Alt-F10 for Monitor Mode (U.S. Version only)                 *
;*    Use Alt-F5 to exit this script                                   *
;*                                                                     *
;* Note: The keys will only be in effect while the script is running.  *
;*                                                                     *
;***********************************************************************

proc main
   set keys on                  ; Force script to process all keystrokes
   while forever                ; Infinite loop
      if hitkey                 ; Check keyboard for pending keystroke
         keyget n0              ; Fetch keycode
         switch n0
            case 0x565C         ; U.K. Backslash keycode
               transmit "\"
            endcase
            case 0x567C         ; U.K. Pipe character
               transmit "|"
            endcase
            case 0x6C00         ; Alt-F5 to exit script
               exitwhile
            endcase
            case 0x7100         ; Alt-F10 for Monitor Mode
               termkey 0x1C
            endcase
            default             ; Handle every other key normally
               termkey n0
            endcase
         endswitch
      endif
   endwhile
endproc
