Not sure how to entirely title this properly so I will explain the best I can. I am guessing something like devilspie may be able to achieve this but I have no experience with it, nor have I ever attempted anything like this.
Before I explain, I want to mention I don’t care if it modifies the Gnome Shell method of locking the screen, but I essentially hope to be able to use the spacebar to lock the screen, so I may also need to use something else for the keybinding
Basically, after a desired set amount of time lets say 5 minutes, of being idle; that is there is no input activity from keyboard or mouse, I would like to be able to hit the spacebar to lock the screen, regardless of any other settings. I want it to over-ride anything possible and just lock the screen when hitting space, but only if it detects the machine is idle as I said. so the space bar would ONLY lock the screen if the machine has been idle for i.e 5 minutes.
If I sounded redundant I apologize, I just wanted to try to be more clear about what I hope to achieve.