home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / vmsnet / tpu / 497 < prev    next >
Encoding:
Text File  |  1992-11-13  |  2.6 KB  |  65 lines

  1. Newsgroups: vmsnet.tpu
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!evetpu.enet.dec.com!mccarthy
  3. From: mccarthy@evetpu.enet.dec.com (Brian J. McCarthy)
  4. Subject: Re: Need help with binding keys.
  5. Message-ID: <1992Nov13.114040.2414@nntpd.lkg.dec.com>
  6. Sender: usenet@nntpd.lkg.dec.com (USENET News System)
  7. Organization: Digital Equipment Corporation
  8. References:   <1992Nov11.184228.1@exodus.valpo.edu>
  9. Date: Fri, 13 Nov 1992 11:33:59 GMT
  10. Lines: 53
  11.  
  12.  
  13. In article <1992Nov11.184228.1@exodus.valpo.edu>, res_ewv@exodus.valpo.edu writes...
  14. >Hello again
  15. >I now have EVE up and running as a kept editor, but I want to be able to
  16. >redefine the CTRL-Z key to now do a WRITE and an ATTACH back to the calling
  17. >process.  I can write a procedure to do both of these things, but I am having
  18. >big problems binding the key to do this.  I am using the line in the TPU code
  19. >DEFINE_KEY(procedure,CTRL_Z_KEY).  I get no error messages at all.  
  20. >Perhaps my problem is that the code is never being reached.  I am placing this
  21. >in the EVE_ATTACH procedure.  This should get executed everytime EVE is called,
  22. >correct?
  23. >                                                                               
  24. >                              Eric W. Vaandering                               
  25.  
  26. Put your key definition in a tpu$local_init procedure.  The following code
  27. redefines CTRL/Z when I bring up the Motif interface of EVE, which I leave
  28. running most of the time.  Since I use the CCT interface for News, VAXNotes,
  29. VAXMail and several other things I can not break of the habbit of using it from
  30. my "work" editor.
  31.  
  32. Note that this procedure references some V3.1 features of DECTPU and EVE 
  33. multiple input files, generate buffer names...
  34.  
  35. procedure tpu$local_init
  36. on_error
  37.     [otherwise] :
  38.     quit (off, 2);
  39. endon_error;
  40.  
  41.     eve_set_keypad_edt;
  42.     eve_set_scroll_margins ("15%","15%");
  43.     eve$add_word_separators ("$!+%@(){}[]|\?/,;:=<>");
  44.     eve$x_get_wild_active := true;    ! read in multiple files
  45.  
  46.     eve$x_generate_bufnames := true;    ! gen unique buf names
  47.     !
  48.     ! Override the ctrlz key in DECwindows not to exit unless I SHIFT it
  49.     !
  50.     if get_info (SCREEN, "decwindows") 
  51.     then
  52.         define_key ('eve_do("")',  ctrl_z_key, 'Do');
  53.         define_key ('eve_exit',  key_name (ctrl_z_key, shift_modified), 
  54.     'Exit');
  55.     endif;
  56.  
  57. --------------------------------------------------------------------------------
  58. Brian J. McCarthy                 Digital Equimpment Corp.
  59. DECtpu/EVE Development Project Leader        Nashau, NH
  60. --------------------------------------------------------------------------------
  61.