help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: Button that has different actions


From: Drew Adams
Subject: RE: Button that has different actions
Date: Wed, 25 Dec 2013 09:14:11 -0800 (PST)

> Can I create a button that has different
> actions depending whether it was clicked with
> mouse-1 or mouse-2?  Or with a modifier key active?
> The modifier might not be feasible because Emacs
> already binds them with mouse clicks.

The answer, unfortunately, is no, not easily/directly.

Such things - allow for multiple actions, popup menu, etc. per
button or tool-bar icon (e.g. via modifier keys) - was requested
long ago, but never got anywhere.

What you can perhaps do as a workaround is to bind a single
command to a button click, and have that command test the event
that lead to the command invocation and then dispatch different
behaviors depending on the event characteristics.



reply via email to

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