[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when to bind *down-mouse* vs *mouse*?

From: Alex Schroeder
Subject: Re: when to bind *down-mouse* vs *mouse*?
Date: Sat, 04 Dec 2004 18:59:21 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

When the action creates a popup menu, I think we want to bind it to
the mouse-down event.  I seem to situations where the menu would
disappear as soon as you released the mouse.  If you released the
mouse on a menu item, that menu item has been "chosen" by the user.

Similary, when the action involves a position, we want to use
mouse-down.  One example is yanking with the mouse.  We want to yank
where the user clicked the mouse button (down), not where the user
released it.

Conversely, when the action is triggered by clicking into some
sensitive area (eg. buttons, links), then we should use mouse-up, so
that the user can change his mind after mouse-down and move away from
the button or link in order to cancel.

.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fifth law:
OOO  Never accept more work than you can handle in one night of hacking.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]