If you use a laptop with a battery, you can disable both the touchpad and the keyboard:
disable the keyboard and TouchPad.
you can use the xinput
command to list and disable all input devices.
to list your input devices, use xinput list
.

then notice the line that says ↳ AT Translated Set 2 keyboard
, the id=?? here next to this is the id of your keyboard input device in xinput
. you will use this to disable and enable your keyboard and also your TouchPad.
in my case, my keyboard has the id 10 and my TouchPad 11.
so to disable my keyboard and touchpad respectively:
xinput float 10
xinput float 11
to restore functionality you also need the master pointer i.e. the number right next to the string slave pointer (?)
on the line of the particular input device you wish to disable. Here notice that to reattach my keyboard, I need another keyboard because I have alread disabled the builtin keyboard. Maybe a USB keyboard. so to reattach your keyboard and mouse:
xinput reattach 10 3
xinput reattach 11 2
Moreover, you can even disable the power button by using the same method, so the only way to stop the playback is to:
- cut the power and take the battery out of the laptop.
- press and hold the power button for more then 3 seconds as this behaviour cannot be changed by software)