Lugaru's Epsilon Programmer's Editor
Context:
|
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,
in some environments.
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 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:
Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.
|