Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Simple Customizing
         Bindings
         Brief Emulation
         CUA Keyboard
         . . .
         Command Files
      Advanced Topics
         . . .
         Updating from an Old Version
         Keys and their Representation
         Customizing the Mouse
      Miscellaneous

Previous   Up    Next
Mouse Keys  Commands by Topic   Miscellaneous


Epsilon User's Manual and Reference > Commands by Topic > Advanced Topics >

Customizing the Mouse

You can rebind the mouse buttons in the same way as other keys using the bind-to-key command, but if, for example, you rebind the left mouse button to copy-region, then that button will copy the region from point to mark, regardless of the location of the mouse. Instead, you might want to use the left button to select a region, and then copy that region. To do this, leave the binding of the left mouse button alone, and instead define a new version of the mouse-left-hook function. By default, this is a subroutine that does nothing. You can redefine it as a keyboard macro using the name-kbd-macro command. Epsilon runs this hook function after you release the left mouse button, if you've used the mouse to select text or position point (but not if, for example, you've clicked on the scroll bar).

Normally Epsilon runs the mouse-select command when you click or double-click the left mouse button, and the context-menu command when you click or double-click the right mouse button. Epsilon runs the mouse-move command when you move the mouse; this is how it changes the mouse cursor shape or pops up a scroll bar or menu bar when the mouse moves to an appropriate part of the screen, in some environments.

It's possible to bind a mouse button to the mouse-to-tag function, which gets the name of an identifier where you clicked and then goes to its definition via tags (see Tags). Or you can use the right-click context menu's Go to Definiton command for this. Both mouse-select and mouse-to-tag run the appropriate hook function for the mouse button that invoked them, whenever you use the mouse to select text or position point. The hook functions for the other two mouse buttons are named mouse-right-hook and mouse-center-hook. You can redefine these hooks to make the mouse buttons do additional things after you select text, without having to write new commands using the extension language. (The context-menu command doesn't call any hook function.)

By default, the center mouse button runs the command mouse-center, which in turn calls the mouse-pan command to make the mouse scroll or pan. Setting the mouse-center-yanks variable makes it perform a different action. Some settings make it call the mouse-yank command, to have the middle mouse button yank text from the clipboard (a traditional function under Unix).

Mice with up to five buttons are supported on Windows and X11. By default, buttons 4 and 5 page up and down.

In Windows, clicking in Epsilon's window when another program's window has the focus sets point to the place you clicked. If you would like clicking to switch to Epsilon but not change point, you can define the Epsilon configuration variable (see Configuration Variables) NOFOCUSCLICK in the registry.

Standard bindings:

  M-<Left>  mouse-select
 M-<Right>  context-menu
 M-<Center>  mouse-center
 M-<Move>  mouse-move
 M-<Button4>  next-page
 M-<Button5>  previous-page
   mouse-pan
   mouse-yank
   mouse-to-tag
 



Previous   Up    Next
Mouse Keys  Commands by Topic   Miscellaneous


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.