MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Wheel mouse under X.


Hi Gadi and Paul

With the scwm window manager (it's similar to FVWM and can be 
programmed in Lisp like Emacs. Download it for free on page 
http://scwm.mit.edu/), you can easily solve the problem this way
(in your .scwmrc file).

--------------------------------------------------------------------
(bind-mouse 'window 4
            (lambda ()
              (if (wildcard-match? "XMathematica"
                                   (current-window-with-pointer))
                  (send-key-press "Prior"
                                  (current-window-with-pointer) #t #t #t))
                         (send-button-press "4" #f #t #t)))
(bind-mouse 'window 5
            (lambda ()
              (if (wildcard-match? "XMathematica"
                                   (current-window-with-pointer))
                  (send-key-press "Next"
                                  (current-window-with-pointer) #t #t #t)
                         (send-button-press "5" #f #t #t))))
--------------------------------------------------------------------
This translates your scroll-events to PageUp or PageDown keypress
events when occuring over a Mathematica window.
You can do the same for other programs that cannot handle button-4
and button-5 events (the scroll wheel) by just generalizing the
wildcard match in the code above.

Yours sincerely
  Bruno


P.S. I set the following in my .Xresources file:

-------------------------------------------------------
*XmGUIFileBox*XmTextField.baseTranslations: \
#override \n\
<Key>Tab: GUIFileBoxCompleteSelection()
-------------------------------------------------------
since I'm used to pressing Tab for filename completion in the shell.


  • Prev by Date: Re: Discrete Convolution
  • Next by Date: Re: HELP : Mathematica v4 producing erroneous results ! Mathematica3 worked fine...
  • Previous by thread: Problem with <<DiscreteMath`KroneckerDelta`
  • Next by thread: need help.