This question already has an answer here:
I am using Ubuntu 16.04 in HP Envy-15 laptop and want the touch-pad to disable automatically whenever I connect my mouse. Is there any particular setting available in Ubuntu?
I have seen many answers which tells how to manually disable the touchpad but I want something that automatically disables it whenever I plug in my mouse. I want to use it as a feature of Ubuntu, not to write some specific script and run on my system only (if any feature is there).