all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-devel@gnu.org>
Subject: RE: Why the `click' modifier for a mouse-wheel event?
Date: Fri, 26 Jun 2009 10:26:32 -0700	[thread overview]
Message-ID: <EEBB69110276441AA2140AB4ACD9D724@us.oracle.com> (raw)
In-Reply-To: <D8E40A33600B4FCFB065A40F01CE2DEA@us.oracle.com>

> Subject line says it all.
> 
> In Emacs 22 (and 21, 20...), using the mouse wheel did not 
> add any modifiers to
> the event that was read.  In Emacs 23, `event-modifiers' for a
> `mouse-wheel-down-event' or `mouse-wheel-up-event' returns `(click)'.
> 
> Why? Is this a bug or a feature or just an inescapable implementation
> limitation?
> 
> This behavior doesn't seem right. Using the mouse wheel 
> (without pressing it to
> realize a click) is not the same as clicking a mouse button.
> 
> (I'm using Windows, so the `event-basic-type' for a wheel 
> rotation is `wheel-up' or `wheel-down'.)

I might add that this can complicate user code. In a context where I know the
mouse wheel has been used, if I want to test for a keyboard (only) modifier, I
now need to do something like this:

(when (intersection (event-modifiers evnt)
                    '(shift control meta alt hyper super))
  ...)

instead of just (when (event-modifiers evnt) ...).
That brings in cl.el (or equivalent code) for `intersection'.

Not a biggee, if there's a good reason why `click' should be returned for a
mouse-wheel event. So...why?





  reply	other threads:[~2009-06-26 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 17:15 Why the `click' modifier for a mouse-wheel event? Drew Adams
2009-06-26 17:26 ` Drew Adams [this message]
2009-06-26 19:32 ` Chong Yidong
2009-07-06  3:27   ` Jason Rumney
2009-07-06  6:40     ` Drew Adams
2009-07-06  8:31       ` Jan D.
2009-07-06 15:34         ` Emacs bug list [was: Why the `click' modifier for a mouse-wheel event?] Drew Adams

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=EEBB69110276441AA2140AB4ACD9D724@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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.