Binding modifier key to mouse button 4 using KeyRemap4MacBook I'm wanting to do this so when I'm gaming I can use the mouse button as my modifier "shift" key instead of having to actually hit ⇧+1 or ⇧+2. This will prevent me from having to take my fingers off of the "1-4" or "Q-R" keys in order to modify them to ⇧+1.

Some notes:


No Mouse Software Available from what I could fine.
KeyRemap4MacBook doesn't have the ability to directly let me do it, so I was hoping there might be someone who could help me with the code needed to add it to the program.
It doesn't just have to work for this mouse only as I'll essential always use it as a third shift key.
I think a global remap might be best.
I have no idea how much difference there is between KeyRemap4MacBook and Karabiner (minus Karabiner Elements), so I can't guarantee that this will work on older versions. KeyRemap4MacBook got a name change to "Karabiner" in 2014 I believe, so some of the documentation may not apply to it anymore.

I only have access to mac with Sierra, so I couldn't test it in any version.


Follow the instructions on how to add custom settings


Get back to this after you've completed step 3.

Ignore step 4 and replace the contents of private.xml with:




&lt;?xml version="1.0"?&gt;
&lt;root&gt;

  &lt;item&gt;
    &lt;name&gt;Mouse Button 4 to Shift&lt;/name&gt;
    &lt;identifier&gt;MouseBtn4ToShift&lt;/identifier&gt;
    &lt;autogen&gt;
      __KeyToKey__
        PointingButton::BUTTON4,
        KeyCode::SHIFT_L
    &lt;/autogen&gt;
  &lt;/item&gt;

&lt;/root&gt;





Continue the instructions on how to add custom settings at step 5.



  If you're not 100% sure that it's actually button number 4 that you're pressing, you can use the EventViewer to check.




Just incase someone is interested:


Filter: Specify application
Filter: Specify device