Originally Posted by MTK358
Also, that will only work in a terminal. I think that the OP is referring to the key being pressed no matter what window is selected.
I was thinking that too, but unless it's the OS, I can't see any real valid reasons to do that as a program should not really be scanning what an alternative program is doing. There are a few cases but they are limited at best. If it did come down to that, I am guessing that's gunna go into scanning /dev/stdin or the relevant device for the keyboard/mouse... far far out of my depth tho, perhaps there is another way, but not that I know of.