This is a script for 2-in-1 laptops. It allows one to disable/reenable the keyboard and touchpad. It was specifically designed to run on an HP ENVY x360; however, it should work on any HP 2-in-1 running Ubuntu 20+. Your mileage may vary!
mkdir -p ~/git; cd ~/git; git clone git@github.com:tagadvance/toggle-tablet-mode.git
cd toggle-tablet-mode
# create shortcut
./install-desktop.pyFinally, add the toggle button to your dock/favorites. Tap the icon to disable or reenable your keyboard and touchpad.
The following two Ask Ubuntu questions served as the inspiration for this script.
