I'm trying to use my keyboard more for navigating and using apps rather than the trackpad for efficiency. It would also be nice to toggle the trackpad while I'm typing to prevent accidental touches.
Could probably write an app that uses quartz event taps to block any input. I think you should be able to distinguish between internal trackpad and external mouse using the public NSEvent properties, but worst case you can always cast to a CGEventRef and access private ones
Someone posted this AppleScript which works, you may need to change the delay in the script:
AppleScript:
tellapplication"System Settings"
activate
reveal anchor "AX_ALT_MOUSE_BUTTONS"of pane id "com.apple.Accessibility-Settings.extension"endtell
delay 1tellapplication"System Events"totellapplication process "System Settings"
click UI element 12of group 1of scroll area 1of group 1of group 2of splitter group 1of group 1of window "Pointer Control"endtell
delay 0.1