Another article  covered how to remap the keyboard keys. You can also remap the three mouse buttons with the X–Mouse Button Control application. With that you can customize mouse button actions in Windows and separate software packages.
Open the software’s website and click on Latest version to save the setup wizard. Then open the wizard to add the software to Windows XP, Vista, 8 and 8.1. Right-click the X-Mouse Button Control system tray icon and select Setup from the context menu to open the window below.
Now you can remap the mouse keys for all windows that do not match any profile by selecting Default. Click on the mouse button drop-down lists to select an alternative function. For example, you could select the right mouse button to open Flip 3D instead of the desktop context menus. Select the Right Button drop-down list and Flip 3D from the menu. Press the Apply button and right-click the mouse to open Flip 3D.
You can also remap the mouse buttons for applications such as Firefox. Open the application first, and press the Add button on the Mouse Button Control window. Then select the software from the list of running applications, and press the OK button. That will add a new application to the window as below.
Select the new application, and click on one of the mouse button drop-down lists. If you add a browser, you can select to assign Browser Favorties, Browser Refresh and Browser Stop to a mouse button. Select Browser Favorites for the right mouse button, and then press that button in the browser to open your bookmarks.
For further options, press the Settings button to open the window below. There you can adjust the mouse speed by dragging the Mouse Speed bar to the left and right. To assign hotkeys to the software, click the Hotkeys tab and then enter new keyboard shortcuts in the text boxes.
You can also set up new layers with alternative functions for the same mouse keys. Select one of the other layer tabs at the top of the window, and add new functions to the mouse keys. Then select Disable from the Switch to drop-down list. Next, right-click on the X-Mouse Button Control system tray icon, select Layers and the layer tab that you customized the mouse buttons for. The X-Mouse Button Control icon on the system tray will then have a layer number on it as below.
So with this app you can now reconfigure your mouse buttons for alternative software packages. Check out the X-Mouse Button Control user guide  for further details.