all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Joe Riel <joer@san.rr.com>, Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: RE: Button that has different actions
Date: Wed, 25 Dec 2013 09:14:11 -0800 (PST)	[thread overview]
Message-ID: <534d09ff-8e69-49e2-9251-bae3fcafbf47@default> (raw)
In-Reply-To: <20131225085027.1ab82982@gauss>

> 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	other threads:[~2013-12-25 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-25 16:50 Button that has different actions Joe Riel
2013-12-25 17:14 ` Drew Adams [this message]
2013-12-26 12:05   ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=534d09ff-8e69-49e2-9251-bae3fcafbf47@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=joer@san.rr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.