Write 2 bash scripts where ever you would like, for the purpose of this let's just say in your home directory. Create two empty documents in your home directory. Name the first one
Enable Touchpad and the other
Insert the following text in "Enable Touchpad"
sudo modprobe psmouse
Insert the following into the second one:
sudo modprobe -r psmouse
Now make both files executable by right clicking on them-> Properties -> Permissions -> Check the box that says "Allow executing file as program".
Open the keyboard preference window. If you're in Unity this can be done by typing keyboard into the dash, or by opening system settings -> keyboard. Now go to the "Shortcuts" tab. Go to "custom shorcuts" and click on the "+" button. Name the first "Enable touchpad" and as a command encase the location of the appropriate script
'/user/home/Enable Touchpad'. Make a second shortcut for disabling the touchpad, naming and pointing to the correct script:
Finally click on the new keyboard shortcuts so they begin grabbing key combinations. Enter your desired key combo. Now, when ever you're going to start typing just disable the touchpad through the key combo, when your done re-enable.
**Note: Since modprobe requieres root acces, you will have to type in your password whenever you enable/disable.