home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / hypercar / 4559 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.3 KB  |  37 lines

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!caen!saimiri.primate.wisc.edu!zazen!news
  3. From: demerit@vms.macc.wisc.edu (J. DeMerit)
  4. Subject: Re: Trapping the esc key?
  5. Message-ID: <1992Dec14.182252.11408@macc.wisc.edu>
  6. Sender: news@macc.wisc.edu (USENET News System)
  7. Organization:  University of Wisconsin Academic Computing Center
  8. Date: 14 DEC 92 12:18:26    
  9. Lines: 26
  10.  
  11. In article <SRO.92Dec12003338@media-lab.media.mit.edu>, sro@media.mit.edu (Shawn O'Donnell) writes...
  12.  
  13. >Hey Doug--
  14. >Maybe there's a more elegant way to intercept the escape key, but the
  15. >following seems to work.  I've noticed that you have to go this route
  16. >if you want to intercept certain of the non-character keys from the
  17. >extended keyboard (like page-up or page-down, for example, despite the
  18. >fact that they are really Cntl-K and Cntl-L.  A handler based on
  19. >ControlKey won't work for those keys.  With escape, I this may be 
  20. >the only option.)
  21. >On keydown key
  22. >  if chartoNum(key) is not 27 then
  23. >    pass keydown
  24. >  end if
  25. >end keydown
  26.  
  27.  
  28. You can also "set lockRecent to true" on idle.  It switches back to false on 
  29. idle.  This is how the mini-cards are recorded and how the escape key retraces 
  30. its path.  If nothing  in the path, you get it?  I think the on keyDown is 
  31. more elegant and is what I would choose, but I thought this aspect worth 
  32. mentioning.
  33.  
  34.