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?

  • $\begingroup$ ...and what mouse are you using? $\endgroup$ – J. M.'s torpor Aug 8 '12 at 1:24
  • $\begingroup$ A generic one, the buttons work in other applications and generate events properly; I added more details to the question. $\endgroup$ – Renan Aug 8 '12 at 1:25
  • 1
    $\begingroup$ 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... $\endgroup$ – J. M.'s torpor Aug 8 '12 at 1:31
  • $\begingroup$ This works by default in Mathematica 7 for Windows. $\endgroup$ – Mr.Wizard Aug 8 '12 at 8:58

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'"

# Bind button 8 to Alt-Left
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"

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).


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

  • 3
    $\begingroup$ 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... $\endgroup$ – Yves Klett Aug 8 '12 at 8:13
  • $\begingroup$ @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:) $\endgroup$ – Ajasja Aug 8 '12 at 8:20
  • $\begingroup$ 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 ;-) $\endgroup$ – Yves Klett Aug 8 '12 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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