home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / jed098-4.zip / JED / DOC / MOUSE.TXT < prev    next >
Text File  |  1997-02-01  |  7KB  |  197 lines

  1. Using a mouse with Jed and XJed
  2. ===============================
  3.  
  4. Jed provides native support for a mouse on the following systems:
  5.  
  6.     1.  A Linux console running the GPM server.  This server is a
  7.     replacement for the `selection' program.  It is available from
  8.     sunsite.unc.edu:/pub/Linux/system/Daemons/gpm-0.97.tar.gz
  9.     
  10.     2.  MSDOS
  11.     
  12.     3.  XJed
  13.     
  14. Later, OS/2 support will be added.    
  15.  
  16. In addition to ``native'' mouse support, JED is able to interact with a
  17. mouse using the `XTerm Event Protocol'.  Support for this protocol is
  18. available when running JED in an XTerm as well as interacting with JED from
  19. an MSDOS terminal emulator, e.g., MS-Kermit, using the PCMOUSE TSR.
  20.  
  21. This docuument is divided into two sections.  The first section describes
  22. native mouse support (Linux, MSDOS, XJed) and the second section describes
  23. the support for the XTerm Event Protocol.
  24.  
  25. ==============================================================================
  26.                 Native Mouse Support
  27. ==============================================================================
  28.  
  29.    The S-Lang file jed/lib/mouse.sl provides a user interface to the mouse.
  30.    It can only be loaded for systems which provide native support for the
  31.    mouse.  Currently this includes MSDOS, Linux console, and XJed. This file
  32.    is automatically loaded from os.sl when JED is started up. (See os.sl for
  33.    how this is accomplished).  Once this file has been loaded, the mouse
  34.    buttons behave as described below.
  35.    
  36.    This interface assumes the presence of a three button mouse.
  37.    Unfortunately, in the MSDOS world, two button mice are are quite common.
  38.    Nevertheless, JED is able to emulate a three button mouse by using the
  39.    ALT key.  Any button pressed in combination with the ALT key is
  40.    considered to be the MIDDLE mouse button.  For example, to get the effect
  41.    of pressing Ctrl-Middle, hold down on the ALT and Ctrl key while pressing
  42.    any mouse button.
  43.     
  44.    Clicking in a window
  45.    --------------------
  46.    
  47.      Left
  48.  
  49.        If a region is already marked, simply un-mark it.  If one is
  50.        not marked, move cursor to the mouse point crossing windows if
  51.        necessary.  If the button is held down and the mouse is
  52.        dragged, a region will be highlighted and then copied to the
  53.        cutbuffer when the button is released.
  54.  
  55.        
  56.      Middle 
  57.  
  58.        If a region is already marked, copy it to the mouse
  59.        paste-buffer. Otherwise, paste text from the system cut buffer
  60.        to current editing point. This MAY NOT BE the position of the
  61.        mouse.
  62.  
  63.      Right 
  64.      
  65.        If a region is already marked, delete it and place a copy into
  66.        the mouse paste-buffer.  Otherwise, simply position the editing
  67.        point at the position of the mouse.  If the button is held down and
  68.        the mouse is dragged, a new region will be marked.
  69.        
  70.     Shift Middle
  71.  
  72.        Insert contents of the last JED mouse copy or kill.  This function
  73.        may be identical to simply clicking on the middle button without
  74.        using the shift key on non-X systems.  Simply clicking the
  75.        middle mouse button will insert the contents of the current
  76.        selection which may not be owned by JED.
  77.        
  78.   Other buttons combinations are undefined.  Some modes may utilize
  79.   the mouse in a slightly different manner.
  80.  
  81.   Clicking on a window status line
  82.   --------------------------------
  83.  
  84.     Left 
  85.        Switch to next buffer.  
  86.        
  87.     Ctrl-Left
  88.        Kill buffer described by status line.
  89.        
  90.     Shift-Left
  91.        Scroll window back one page.
  92.        
  93.     Shift-Right
  94.        Scroll window forward one page
  95.        
  96.     Middle
  97.        Split the window.
  98.        
  99.     Right:  
  100.        Delete the window
  101.  
  102.   For example, one can quickly move from one buffer to the next by simply
  103.   clicking on the status line with the left mouse button.
  104.  
  105.   Tips for using the mouse
  106.   -------------------------
  107.   
  108.      1.  To quicky move the cursor to another location, simply point the
  109.      mouse at that spot and click the LEFT mouse button.
  110.      
  111.      2.  To copy a region for subsequent pasting, move the mouse to the
  112.          beginning of the region and press the LEFT mouse button.
  113.      While holding it down, ``drag'' the mouse to the end of the
  114.      region and release it.
  115.      
  116.      3.  To cut a region and put it in the paste buffer, define a
  117.      region by dragging with the RIGHT mouse button.  Now release
  118.      the RIGHT button and then press and immediately release it.
  119.  
  120. ==============================================================================
  121.                  XTerm Event Support
  122. ==============================================================================
  123.  
  124. Xterm event support is provided by not only Xterm but also the Linux console
  125. running the `selection' program.  Only versions 1.6 and greater of selection
  126. provide this support.  In addition, one must be using a recent Linux kernel
  127. (1.1.35 or newer.)  Please note that the selection program is considered
  128. obsolete and should be replaced by the GPM mouse server.
  129.  
  130. Installation
  131. =============
  132.  
  133. To enable JED to use this mouse support, the following steps must be
  134. performed:
  135.  
  136.    1.  Make sure you have the appropriate version of selection and the Linux
  137.        kernel installed.
  138.        
  139.    2.  Put the following on your .jedrc file:
  140.    
  141.           () = evalfile ("mousex");
  142.       
  143.        The file `mousex.sl' creates three hooks: `exit_hook', `suspend_hook',
  144.        and `resume_hook'.  If you have already defined these hooks for
  145.        yourself, look at `mousex.sl' and modify your hooks appropriately.
  146.        These hooks are necessary so that the `selection' state can be
  147.        properly initialized and restored.
  148.        
  149. Mouse Usage
  150. ===========
  151.  
  152.  Left Button:
  153.  ------------
  154.  
  155.    If the left button is clicked on the status line of a window, the window 
  156.    will switch to a different buffer.
  157.  
  158.    If the button is pressed anywhere else in the window, the cursor will be
  159.    positioned at the location of the click.
  160.  
  161.  Middle Button:
  162.  -------------
  163.    
  164.    On status line: split the window
  165.    Anywhere else:
  166.     If the region is highlighted, the region will be copied to the 
  167.     pastebuffer.  This does not delete the region.
  168.     Otherwise, the contents in the pastebuffer will be pasted to the current
  169.     editing point.
  170.  
  171.  Right Button:
  172.  -------------
  173.  
  174.    On status line: delete the window.
  175.    Anywhere else:
  176.     If a region is highlighted, the region will be extended to the position
  177.     of the mouse.
  178.     Otherwise, the mark is set and a region will be defined.
  179.  
  180.  Cut/Paste Tips:
  181.   
  182.   To mark and manipulate a region do:
  183.  
  184.    1. Click the LEFT mouse button at the beginning of the region.
  185.    2. Move the mouse to the end of the region and click the RIGHT
  186.       mouse button.  The region should now be marked.
  187.    3. Click the MIDDLE button to copy the region to the pastebuffer.
  188.  
  189.    4. To paste from the pastebuffer, move the cursor to where you want to 
  190.       paste and press the MIDDLE button.
  191.  
  192.        
  193.           
  194.    
  195.  
  196.   
  197.