Can I create a keyboard shortcut to toggle the primary mouse button between left and right? I switch between my left and right hand for my mouse a lot, and every time I do, I have to go to System Preferences > Mouse > and switch the Primary mouse button. Is there any way I can create a keyboard shortcut to toggle this setting? I'm willing to figure out AppleScript if that would help me
Looks like this has already been answered here:

Swap Mouse Button using AppleScript

Tested it and the code works for a normal external mouse.