To enable or disable touchpad or any other hardware device on linux you need to make use of xinput command.

The official manpage describes xinput as:

xinput is a utility to list available input devices, query information about a device and change input device settings.

To enable/disable touch pad we need to run xinput list. When I run xinput list I get the following output.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ HP Webcam-50                              id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=12   [slave  keyboard (3)]
    ↳ HP Wireless hotkeys                       id=13   [slave  keyboard (3)]

As you can see above I own a HP laptop, so there is HP based devices in my system.

What we need is the id of the touchpad, in my case that is 11.

To disable the touchpad do following:

$ xinput set-prop 11 "Device Enabled" 0

To enable touchpad do following:

$ xinput set-prop 11 "Device Enabled" 1

Map these to any key combination in your window-manager or you can make alias for your shell so you can execute this command easily.