[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help:Enable mouse wheel
From: |
Francois Fleuret |
Subject: |
Re: Help:Enable mouse wheel |
Date: |
14 May 2003 17:57:56 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Hi people,
Jasen wrote on 14 May 2003 02:44:38 MET:
> Does anybody know how to enable mouse wheel on Linux? I'm using Redhat
> 8.0 and Emacs 21.2.
I personnaly have the following in my .emacs (with the standard
settings, which is mouse wheel behave like buttons 4 and 5):
,----
| ;; Wheel mouse moves up and down 2 lines
| (define-key global-map [mouse-4] (lambda () (interactive) (scroll-down 2)))
| (define-key global-map [mouse-5] (lambda () (interactive) (scroll-up 2)))
|
| ;; with shift it goes faster
| (define-key global-map [(shift mouse-4)] (lambda () (interactive)
(scroll-down 50)))
| (define-key global-map [(shift mouse-5)] (lambda () (interactive) (scroll-up
50)))
|
| ;; with control it controls the buffer we are looking at
| (define-key global-map [(control mouse-4)] 'next-buffer)
| (define-key global-map [(control mouse-5)] 'bury-buffer)
`----
Regards,
FF