I'm looking for a way to temporarily disable or lock my laptop's keyboard when I massage my cat. She likes to sit on my lap with her front paws on the keyboard while I work on my computer in the evenings, and she often presses keys that interfere with what I'm doing on screen. Is there a way to prevent these accidental key presses so I can focus on the massage? I'm using Linux Mint, so any tips specific to that would be appreciated!
3 Answers
Have you tried just closing the laptop's lid? Though, you might want it up for watching something while you massage your cat. Maybe consider a USB keyboard or using a different configuration?
Another option is to use xtrlock, which, if available in your repo, can lock the keyboard while keeping the screen on. You can check its availability with 'sudo apt list xtr*' in the terminal.
Thanks for the tip! I’ll give xtrlock a try too.
You might want to check out xinput. It's a command-line utility for managing input devices in Linux. You can assign a key combination to disable your keyboard temporarily. Just search online for 'xinput disable keyboard' to get started.
That sounds great! I’ll look into xinput. Do you know if it requires complicated setup?

I thought about that, but I’d like to keep the screen open for shows!