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:
tell application "System Settings"
activate
reveal anchor "AX_ALT_MOUSE_BUTTONS" of pane id "com.apple.Accessibility-Settings.extension"
end tell
delay 1
tell application "System Events" to tell application process "System Settings"
click UI element 12 of group 1 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Pointer Control"
end tell
delay 0.1