When I close the lid, the computer hibernates and I would like it to keep hibernating until i open the lid and give it a mouse click or keystroke. The problem is that I have a bluetooth keyboard and mouse connected to it. So if I accidentally press a mouse button or a key on the keyboard it wakes from hibernation which is very annoying since I use this laptop at work and bring it with me to and from work every day including the mouse and keyboard.
I put these in my backpack and naturally, keys on both the mouse and keyboard are being pressed in my backpack thus waking the laptop which I do not want.
I have tried
I can turn off my mouse physically with a switch on the mouse and just turn it back on when I want to use it so the mouse is not the problem. They keyboard is. I have a Microsoft Surface keyboard that is connected not to a usb bluetooth dongle, but directly to the laptops bluetooth. There is no switch to turn the keyboard off either.
I can't seem to find proper infromation on what hibernate actually does either. The official ubuntu docs don't seem to detail hibernation or what is affected, what isn't and how things are affected.
What do I want?
I would like to know if and how to have something similar to
If lid closed => ignore input
On hibernate => disable bluetooth && on wake => Re-enable bluetooth.