home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / PDXOS2-1.ZIP / SAMPLE / KEYCODES.SC < prev    next >
Encoding:
Text File  |  1988-12-29  |  2.7 KB  |  46 lines

  1. ; Contains Licensed Material Copyright (C) 1987 Ansa Software -- MJP
  2.  
  3. ; This procedure sets variables to be used in conjunction with the Data Entry
  4. ; Toolkit.  The reason why these variables are useful is that the DoWait
  5. ; procedure allows us to look at the last key that was pressed.  If we wanted
  6. ; to determine whether the last key pressed was [F1] (help), then rather than
  7. ; looking up the extended ASCII code for the F1 key, we could simply test to
  8. ; see if the character is TKHelp.
  9. ;
  10. ; Although the variables defined require a fair amount of memory (about 4K), we
  11. ; suggest that they be used in all cases where memory is not a critical
  12. ; constraint, as use of these variables will add to the readability of your
  13. ; code.  If you do run into memory problems, you can use the PrepareFinal
  14. ; subsystem of the toolkit to replace these variables (in you programs) with
  15. ; their actual values.  You may then simply remove the "SetKeycodes()" statement
  16. ; from your initialization procedure.
  17. ;
  18. ; Your programs need to call the SetKeycodes procedure if and only if they
  19. ; incorporate the variables listed below.  (The Toolkit will not automatically
  20. ; call the SetKeycodes procedure, as it does not use these variables).
  21. ;
  22. Proc SetKeycodes()
  23.    TKCtrlPgUp=-132       TKFieldView=-108      TKUp=-72          TKHelp=-59
  24.    TKCtrlHome=-119       TKInstantPlay=-107    TKHome=-71        TKDitto=4
  25.    TKCtrlPgDn=-118       TKInstantRecord=-106  TKMenu=-68        TKBeep=7
  26.    TKCtrlEnd=-117        TKLockKey=-38         TKEditKey=-67     TKTab=9
  27.    TKCtrlRight=-116      TKKeyLookup=-37       TKClearImage=-66  TKEnter=13
  28.    TKCtrlLeft=-115       TKPgDn=-81            TKFormKey=-65     TKCancel=0
  29.    TKPalMenu=-113        TKDown=-80            TKCheck=-64       TKRotate=18
  30.    TKCoEditKey=-112      TKEnd=-79             TKExample=-63     TKUndo=21
  31.    TKClearAll=-111       TKRight=-77           TKDownImage=-62   TKEsc=27
  32.    TKInstantReport=-110  TKLeft=-75            TKUpImage=-61     TKDel=-83
  33.    TKCheckPlus=-109      TKPgUp=-73            TKDo_It!=-60      TKIns=-82
  34.    TKCtrlBreak=0         TKZoom=26             TKGoKey=7         TKRefresh=-19
  35.    TKF40=-113   TKF30=-103   TKF20=-93   TKF10=-68   TKReverseTab=-15
  36.    TKF39=-112   TKF29=-102   TKF19=-92   TKF9=-67    TKDeleteLine=25
  37.    TKF38=-111   TKF28=-101   TKF18=-91   TKF8=-66    TKZoomNext=-44
  38.    TKF37=-110   TKF27=-100   TKF17=-90   TKF7=-65    TKVertRuler=22
  39.    TKF36=-109   TKF26=-99    TKF16=-89   TKF6=-64    TKBackspace=8
  40.    TKF35=-108   TKF25=-98    TKF15=-88   TKF5=-63    TKCtrlBackspace=127
  41.    TKF34=-107   TKF24=-97    TKF14=-87   TKF4=-62
  42.    TKF33=-106   TKF23=-96    TKF13=-86   TKF3=-61
  43.    TKF32=-105   TKF22=-95    TKF12=-85   TKF2=-60
  44.    TKF31=-104   TKF21=-94    TKF11=-84   TKF1=-59
  45. Endproc
  46.