unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Mouse wheel
@ 2003-06-04 18:15 Stefan Monnier
  2003-06-04 21:00 ` Jason Rumney
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2003-06-04 18:15 UTC (permalink / raw)



Now that we've settled on wheel-up and wheel-down, how about adding
something like the following to bindings.el:

(define-key global-map [wheel-up]	'mwheel-scroll)
(define-key global-map [wheel-down]	'mwheel-scroll)
(define-key global-map [C-wheel-up]	'mwheel-scroll)
(define-key global-map [C-wheel-down]	'mwheel-scroll)
(define-key global-map [S-wheel-up]	'mwheel-scroll)
(define-key global-map [S-wheel-down]	'mwheel-scroll)
(define-key global-map [S-C-wheel-up]	'mwheel-scroll)
(define-key global-map [S-C-wheel-down]	'mwheel-scroll)
(define-key global-map [M-wheel-up]	'mwheel-scroll)
(define-key global-map [M-wheel-down]	'mwheel-scroll)
(define-key global-map [M-C-wheel-up]	'mwheel-scroll)
(define-key global-map [M-C-wheel-down]	'mwheel-scroll)
(define-key global-map [M-S-wheel-up]	'mwheel-scroll)
(define-key global-map [M-S-wheel-down]	'mwheel-scroll)
(define-key global-map [M-S-C-wheel-up]	'mwheel-scroll)
(define-key global-map [M-S-C-wheel-down] 'mwheel-scroll)

We should also add an autoload cookie to `mwheel-scroll'.
We can then remove the (mouse-wheel-mode 1) call in w32-win.el and
in x-win.el we need to add:

(define-key function-key-map [mouse-4]		[wheel-up])
(define-key function-key-map [mouse-5]		[wheel-down])
(define-key function-key-map [C-mouse-4]	[C-wheel-up])
(define-key function-key-map [C-mouse-5]	[C-wheel-down])
...

and related friends (ideally we should be able to do this mapping
automatically by querying the X server, but it seems difficult/impossible,
so for now we'll just use function-key-map).  Of course, a bit more work
than the above is needed, but I'm just trying to see if we all agree
this is the way to go.


	Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Mouse wheel
  2003-06-04 18:15 Mouse wheel Stefan Monnier
@ 2003-06-04 21:00 ` Jason Rumney
  2003-06-04 21:04   ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Rumney @ 2003-06-04 21:00 UTC (permalink / raw)
  Cc: emacs-devel

"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

> We can then remove the (mouse-wheel-mode 1) call in w32-win.el and
> in x-win.el we need to add:
> 
> (define-key function-key-map [mouse-4]		[wheel-up])
> (define-key function-key-map [mouse-5]		[wheel-down])
> (define-key function-key-map [C-mouse-4]	[C-wheel-up])
> (define-key function-key-map [C-mouse-5]	[C-wheel-down])
> ...
> 
> and related friends (ideally we should be able to do this mapping
> automatically by querying the X server, but it seems difficult/impossible,
> so for now we'll just use function-key-map).  Of course, a bit more work
> than the above is needed, but I'm just trying to see if we all agree
> this is the way to go.

Probably. I'm not sure what X users with >3 button mice + wheel do
with their ZAxisMapping.  There are probably enough apps that are
hardwired to use mouse-4 and mouse-5 as the wheel, to force such users
to go to the trouble of mapping buttons 4 and 5 to 6 and 7 so they can
leave 4 and 5 free for the wheel.

I thought there was a way of handling z-axis events in X directly
without the mapping, but after searching now I think I might have
been misled by GDK or vi documentation (both of which basically do the
above function-key-mapping).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Mouse wheel
  2003-06-04 21:00 ` Jason Rumney
@ 2003-06-04 21:04   ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2003-06-04 21:04 UTC (permalink / raw)
  Cc: Stefan Monnier

> > We can then remove the (mouse-wheel-mode 1) call in w32-win.el and
> > in x-win.el we need to add:
> > 
> > (define-key function-key-map [mouse-4]		[wheel-up])
> > (define-key function-key-map [mouse-5]		[wheel-down])
> > (define-key function-key-map [C-mouse-4]	[C-wheel-up])
> > (define-key function-key-map [C-mouse-5]	[C-wheel-down])
> > ...
> > 
> > and related friends (ideally we should be able to do this mapping
> > automatically by querying the X server, but it seems difficult/impossible,
> > so for now we'll just use function-key-map).  Of course, a bit more work
> > than the above is needed, but I'm just trying to see if we all agree
> > this is the way to go.
> 
> Probably. I'm not sure what X users with >3 button mice + wheel do
> with their ZAxisMapping.  There are probably enough apps that are
> hardwired to use mouse-4 and mouse-5 as the wheel, to force such users
> to go to the trouble of mapping buttons 4 and 5 to 6 and 7 so they can
> leave 4 and 5 free for the wheel.

That's already the case right now anyway.  They can play around with
Emacs bindings if they prefer: the above define-key statements
shouldn't get in their way as far as I can tell.

> I thought there was a way of handling z-axis events in X directly
> without the mapping, but after searching now I think I might have
> been misled by GDK or vi documentation (both of which basically do the
> above function-key-mapping).

Indeed, it seems pretty difficult to robustly get the Z-axis events.


	Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-04 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-04 18:15 Mouse wheel Stefan Monnier
2003-06-04 21:00 ` Jason Rumney
2003-06-04 21:04   ` Stefan Monnier

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).