emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mouse wheel


From: Stefan Monnier
Subject: Mouse wheel
Date: Wed, 04 Jun 2003 14:15:59 -0400

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]