Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a generic mouse with back/forward buttons. Those buttons are recognized by the system - I can use xev to see that they generate events for buttons number 8 and 9.

I am so used to using them for web browsing, that I sometimes end up pressing them when I'm browsing through Mathematica's help system.

Is there some way to bind those buttons to the back/forward functions in the help system? I looked around in the settings but haven't found anything.

I'm using Mathematica 8.0 in Linux, if this is relevant. Any ideas?

share|improve this question
    
...and what mouse are you using? –  J. M. Aug 8 '12 at 1:24
    
A generic one, the buttons work in other applications and generate events properly; I added more details to the question. –  Renan Aug 8 '12 at 1:25
1  
Well, from here, the keyboard shortcuts are Alt+Left Arrow for "Back", and Alt+Right Arrow for "Forward", so you might be able to do some mapping... –  J. M. Aug 8 '12 at 1:31
    
This works by default in Mathematica 7 for Windows. –  Mr.Wizard Aug 8 '12 at 8:58
add comment

2 Answers

up vote 7 down vote accepted

I was able to make this solution using xbindkeys and it works well enough:

# Bind button 9 to Alt-Right
"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"
b:9

# Bind button 8 to Alt-Left
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
b:8
share|improve this answer
add comment

Windows users can accomplish the binding using Autohotkey.

Here is a simple script that maps the wheel right and wheel left mouse buttons to Alt+Left and Alt+Right (since I don't have a mouse with forward/backward buttons).

WheelLeft::!Left
WheelRight::!Right

Also useful for pepole who like using the moouse is StrokeIt, a free program that allows one to bind mince gestures to keyboard shortcuts.

share|improve this answer
3  
For my combination (Win7 64, Mathematica 8.04 and Logitech MX Revolution) the back/forward buttons work for the help system out of the box... –  Yves Klett Aug 8 '12 at 8:13
    
@YvesKlett Nice to know. I have a Logitech RX1000 (win7 64 mma 8.04) which does not have the extra buttons. But wheel left wheel right work nicely and I have not been using them until now:) –  Ajasja Aug 8 '12 at 8:20
    
With the same mouse, but earlier versions (of Windows and Mathematica and the Logitech drivers) this did not work, so I cannot tell which update triggered this goodie ;-) –  Yves Klett Aug 8 '12 at 8:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.