Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Simple Customizing
         Bindings
         Brief Emulation
         CUA Keyboard
         . . .
         Using National Characters
      Advanced Topics
         . . .
         Keys and their Representation
         Altering Keys
         Customizing the Mouse
      Miscellaneous

Previous   Up    Next
Altering 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 mouse-to-tag 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 under DOS or OS/2.

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. (Note that in Epsilon for Windows mouse-to-tag displays a context menu instead of selecting text, by calling the context-menu command, and doesn't call any hook function.)

By default, the center mouse button runs the command mouse-center, which calls either mouse-yank to make the mouse yank text from the clipboard under Unix, or mouse-pan, so that button makes the mouse scroll or pan (in other environments).

Standard bindings:

  M-<Left>  mouse-select
 M-<Right>  mouse-to-tag
 M-<Center>  mouse-center
 M-<Move>  mouse-move
   mouse-pan
   mouse-yank
   context-menu
 



Previous   Up    Next
Altering Keys  Commands by Topic   Miscellaneous


Lugaru Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.