* Crisis ([EMAIL PROTECTED]) wrote:
> I have been trying for awhile to get my Logitech Mouse Scroll Wheel to work
> in X. Does anyone know of any way to get it to work? Thanks in advance.
In order to get the wheel "seen" under X I put something like (my mouse
is a Logitech PS/2 Intellimouse)
Section "Pointer"
Protocol "IMPS/2"
Device "/dev/mouse"
Buttons 5
ZAxisMapping 4 5
EndSection
inside /etc/X11/XF86Config, and then one should configure applications
to use the 4th and 5th buttons. As examples I append below those
parts in my .Xresources .emacs and /usr/X11R6/lib/X11/app-defaults/XTerm
which make the wheel scroll inside Netscape, emacs and xterm's.
They have been hacked from various postings on this list and they are
not necessarily the most intelligent ones...
.Xresources:
Netscape*drawingArea.translations: #replace \
Ctrl<Btn4Down>: PageUp()\n\
Ctrl<Btn5Down>: PageDown()\n\
Shift<Btn4Down>: LineUp()\n\
Shift<Btn5Down>: LineDown()\n\
None<Btn4Down>: LineUp()LineUp()LineUp()LineUp()LineUp()LineUp()\n\
None<Btn5Down>: LineDown()LineDown()LineDown()LineDown()LineDown()Line
Alt<Btn4Down>: xfeDoCommand(forward)\n\
Alt<Btn5Down>: xfeDoCommand(back)\n
Netscape*globalNonTextTranslations: #override\n\
Shift<Btn4Down>: LineUp()\n\
Shift<Btn5Down>: LineDown()\n\
None<Btn4Down>:LineUp()LineUp()LineUp()LineUp()LineUp()LineUp()\n\
None<Btn5Down>:LineDown()LineDown()LineDown()LineDown()LineDown()LineDown()\n\
Alt<Btn4Down>: xfeDoCommand(forward)\n\
Alt<Btn5Down>: xfeDoCommand(back)\n
.emacs:
;;=============================================================================
;; scroll on wheel of mouses
;;=============================================================================
;; scroll on wheel of mouses
(defun up-slightly () (interactive) (scroll-up 5))
(defun down-slightly () (interactive) (scroll-down 5))
(global-set-key [mouse-4] 'down-slightly)
(global-set-key [mouse-5] 'up-slightly)
(defun up-one () (interactive) (scroll-up 1))
(defun down-one () (interactive) (scroll-down 1))
(global-set-key [S-mouse-4] 'down-one)
(global-set-key [S-mouse-5] 'up-one)
(defun up-a-lot () (interactive) (scroll-up))
(defun down-a-lot () (interactive) (scroll-down))
(global-set-key [C-mouse-4] 'down-a-lot)
(global-set-key [C-mouse-5] 'up-a-lot)
and XTerm (they are already there commented if I remember correctly):
!This can be useful if you have an IntelliMouse. It maps the button
!events generated by the wheel
*VT100*translations: #override \
!Ctrl <Btn4Down>: scroll-back(1,halfpage) \n\
!Lock Ctrl <Btn4Down>: scroll-back(1,halfpage) \n\
!Lock @Num_Lock Ctrl <Btn4Down>: scroll-back(1,halfpage) \n\
! @Num_Lock Ctrl <Btn4Down>: scroll-back(1,halfpage) \n\
<Btn4Down>: scroll-back(5,line) \n\
!Ctrl <Btn5Down>: scroll-forw(1,halfpage) \n\
!Lock Ctrl <Btn5Down>: scroll-forw(1,halfpage) \n\
!Lock @Num_Lock Ctrl <Btn5Down>: scroll-forw(1,halfpage) \n\
! @Num_Lock Ctrl <Btn5Down>: scroll-forw(1,halfpage) \n\
<Btn5Down>: scroll-forw(5,line)
look also at http://www.inria.fr/koala/colas/mouse-wheel-scroll/
Paola Sala
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.