[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Why the `click' modifier for a mouse-wheel event?
From: |
Drew Adams |
Subject: |
RE: Why the `click' modifier for a mouse-wheel event? |
Date: |
Fri, 26 Jun 2009 10:26:32 -0700 |
> 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?