[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Subject: w32 mouse wheel handling
From: |
Stefan Monnier |
Subject: |
Re: Subject: w32 mouse wheel handling |
Date: |
Sun, 25 May 2003 11:19:53 -0400 |
> > 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
- Subject: w32 mouse wheel handling, David PONCE, 2003/05/23
- Re: Subject: w32 mouse wheel handling, Michael Welsh Duggan, 2003/05/25
- Re: Subject: w32 mouse wheel handling, David Ponce, 2003/05/25
- Re: Subject: w32 mouse wheel handling,
Stefan Monnier <=
- Re: Subject: w32 mouse wheel handling, Kim F. Storm, 2003/05/25
- Re: Subject: w32 mouse wheel handling, Kai Großjohann, 2003/05/26
- Re: Subject: w32 mouse wheel handling, Richard Stallman, 2003/05/27
- Re: Subject: w32 mouse wheel handling, David Ponce, 2003/05/28
- Re: Subject: w32 mouse wheel handling, Jason Rumney, 2003/05/29
- Re: Subject: w32 mouse wheel handling, Richard Stallman, 2003/05/29
- Re: Subject: w32 mouse wheel handling, David Ponce, 2003/05/30
Re: Subject: w32 mouse wheel handling, Jason Rumney, 2003/05/26
Re: Subject: w32 mouse wheel handling, Jason Rumney, 2003/05/27