To Disable Touch pad when you use external mouse, use below command which will help you to disable the mouse when you insert external mouse and enables automatically when you remove the external mouse.
To get started, enter the following commands in the Terminal to install Touchpad-indicator:
sudo add-apt-repository ppa:atareao/atareao sudo apt-get update sudo apt-get install touchpad-indicator
Once done, launch Touchpad-indicator from the Unity Dash and go to Preferences from the system tray menu. You can also use the system tray menu to manually enable or disable the Touchpad, hide the app-indicator icon and to exit Touchpad-indicator.
You can set the preferences so that mouse can enable/ disable automatically when you insert / remove the external mouse. for same follow the below steps…
1. Click on TouchPab
2. Click on Perferences
3. Click on “Disable touchpad when mouse plugged” as shown in above scree shot.
4. Now Click on “OK” and your system will disable the touchpad whenever you attache external mouse.