From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Subject: w32 mouse wheel handling
Date: Sun, 25 May 2003 11:19:53 -0400 [thread overview]
Message-ID: <200305251519.h4PFJr5C014545@rum.cs.yale.edu> (raw)
In-Reply-To: 871xynu0bo.fsf@cs.cmu.edu
> > Another annoying thing with the way mouse wheel events are handled in
> > NT Emacs, is that it is impossible to directly bind commands to scroll
> > up or down events, nor to bind commands to mouse wheel events on the
> > mode line or header line only, like in X. For example, I can't do
> > something like this ;-)
> >
> > (global-set-key [mode-line mouse-4] 'mode-line-unbury-buffer)
> > (global-set-key [mode-line mouse-5] 'mode-line-bury-buffer)
> >
> > I submit you the following patch to handle mouse wheel events in NT
> > Emacs like in X, that is as mouse click events. Scrolling the wheel
> > up produces mouse-4 events, and scrolling the wheel down produces
> > mouse-5 events, eventually prefixed by header or mode line depending
> > on the mouse location :-)
> >
> > Finally, handling all mouse events in an uniform way seems to have
> > fixed the performance problem mentioned above :-)
>
> I would agree with this. When I wrote the original mouse wheel
> support (now long since changed to better implementations), I created
> the mouse-wheel event because (to the best of my knowlede, at the
> time at least) these events hadn't been standardized into a
> mouse-4/mouse-5 event at that time in X.
I agree on the principle, but I think using mouse-4 and mouse-5 is
not correct. It's just an X11 hack. I'd rather create new events
like wheel-up and wheel-down and then have a function-key-map to
translate mouse-4 and mouse-5 to wheel-up and wheel-down (on X).
The only problem with it is that xterm-mouse-mode already uses
the function-key-map to generate mouse-4 and mouse-5, so we'd
have to change xterm-mouse-mode to manually pass its output through
function-key-map.
I don't know what mouse-wheel events look like under W32 (or
under MacOS for that matter), so I'm not sure whether such an interface
would be limiting.
Stefan
next prev parent reply other threads:[~2003-05-25 15:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-23 14:47 Subject: w32 mouse wheel handling David PONCE
2003-05-25 4:17 ` Michael Welsh Duggan
2003-05-25 8:34 ` David Ponce
2003-05-25 15:19 ` Stefan Monnier [this message]
2003-05-25 23:22 ` Kim F. Storm
2003-05-26 5:09 ` Kai Großjohann
2003-05-27 12:44 ` Richard Stallman
2003-05-28 22:18 ` David Ponce
2003-05-29 7:33 ` Jason Rumney
2003-05-30 0:50 ` Richard Stallman
2003-05-30 12:14 ` David Ponce
2003-05-26 13:30 ` Jason Rumney
2003-05-27 7:21 ` Jason Rumney
-- strict thread matches above, loose matches on Subject: below --
2003-05-27 8:12 David PONCE
2003-05-27 8:29 ` Juanma Barranquero
2003-05-27 8:45 ` Jason Rumney
2003-05-27 8:49 ` Juanma Barranquero
2003-05-27 22:41 ` Richard Stallman
2003-05-28 7:50 ` Oliver Scholz
2003-05-27 14:28 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200305251519.h4PFJr5C014545@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).