Article 129385 of comp.os.vms:
Newsgroups: comp.os.vms
Path: nntpd.lkg.dec.com!pa.dec.com!decwrl!enews.sgi.com!lll-winken.llnl.gov!fnnews.fnal.gov!unixhub!sldb6.slac.stanford.edu!fairfield
From: fairfield@sldb6.slac.stanford.edu
Subject: Re: eve and mouse
Message-ID: <1995Sep15.011107.1@sldb6.slac.stanford.edu>
Lines: 87
Sender: news@unixhub.SLAC.Stanford.EDU
Organization: Stanford Linear Accelerator Center
References: <4CAD511634A@orchid.le.ac.uk> <43aq36$12qi@news.ccit.arizona.edu>
Date: Fri, 15 Sep 1995 09:11:07 GMT

In article <43aq36$12qi@news.ccit.arizona.edu>,
                        leonard@craw.tgv.com (Aaron Leonard) writes:
[...]
> If you whack on the DO key, then enter TPU SET(MOUSE,OFF) or
> TPU SET(MOUSE,ON), then you can toggle between mouse-moves-
> EVE-cursor mode and mouse-lets-you-cut-and-paste mode.
>
> Personally, I map TPU SET(MOUSE,OFF) to <gold>M and
> TPU SET(MOUSE,ON) to <gold><ctrl/M> 'cause I toggle
> back and forth all the time.

        Two key definitions to  make  a  toggle?!   I think not, my dear
    Aaron.   :-)

        Below my sig  is  a  TPU  procedure  which  implements a new EVE
    command,  "Change Mouse" (because the other EVE toggle commands  are
    called "Change"), as well as the auxiliary commands "Set  Mouse  On"
    and  "Set Mouse Off" (which I never use).  Add this file to your TPU
    section, or use it as a  /COMMAND  file, and you'll toggle the mouse
    on/off  with a simple GOLD/M key stroke. :-)  Change the  DEFINE_KEY
    to suit your preference.  The example will work as-is for a /COMMAND
    file (or point the logical TPU$COMMAND to it), but you might want to
    do the DEFINE_KEY differently if you're using  EVE$BUILD  to  create
    your section file, etc.

        -Ken
--
 Kenneth H. Fairfield       |  Internet: Fairfield@Slac.Stanford.Edu
 SLAC, P.O.Box 4349, MS 46  |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
 Stanford, CA   94309       |  Voice:    415-926-2924    FAX: 415-926-3515
 -------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...

-------------------------- cut/here -----------------------------------------
!++
!   The following three "Mouse" procedures enable, disable, and toggle,
!   respectively,  EVE's mouse support.  With mouse support disabled,
!   the windowing system's cut and paste is operable.  With mouse enabled,
!   EVE has control over mouse events.
!
!   Author/Date:        K.H. Fairfield,         10-OCT-1992
!--

Procedure Eve_Set_Mouse_On
!         ----------------
!    On_Error
!        Message (ERROR_TEXT);
!        Eve$Learn_Abort;
!        Return (FALSE);
!    Endon_Error;

    Set (MOUSE, ON);
    Eve$message ("EVE Mouse enabled, EVE is in control.");
    Return;

Endprocedure;   ! Eve_Set_Mouse_On


Procedure Eve_Set_Mouse_Off
!         -----------------

    Set (MOUSE, OFF);
    Eve$message ("EVE Mouse disabled, windowing system is now in control.");
    Return;

Endprocedure;   ! Eve_Set_Mouse_Off


Procedure Eve_Change_Mouse
!         ----------------

    If Get_Info (SCREEN, "MOUSE")
    Then
        Set (MOUSE, OFF);
        Eve$message ("EVE Mouse disabled, windowing system is now in control.");
    Else
        Set (MOUSE, ON);
        Eve$message ("EVE Mouse enabled, EVE is in control.");
    Endif;
    Return;

Endprocedure;   ! Eve_Change_Mouse

DEFINE_KEY (eve$$kt_return +"eve_change_mouse", Key_Name ("m", shift_key),
                               " change_mouse", eve$x_user_keys);

------------------------- cut/here -----------------------------------------


