I know KDE has a widget for that, but I don't seem to find it in Elementary OS. Any help?
Installing a Touchpad Indicator could help with this as it seemed to be a "go-to fix" for Ubuntu 16.04 which I used in the past.
To do so, open Terminal and paste these commands:
sudo add-apt-repository ppa:atareao/atareao sudo apt-get update sudo apt-get install touchpad-indicator
Then launch touchpad-indicator from the Applications Menu which will place an indicator for your touchpad on the top panel. Click on the icon, select Preferences. You can then check 'Disable While Typing'.