-
Unfocused keylistener
Hello
I'm working on a project for school where I need to listen for a buttonpress on an unfocused application and I have no idea how to do this or if Java even can do this.
The application I'm doing is a screenshot grabber that listens to the PrntScrn key.
Any help is appreciated, thanks in advance.
-
Not sure that a Java program can listen for events if it doesn't have the focus.
-
maybe write an application that has the keypressed listener in it but make the shell size 0X0 and have no views or anything in it and then somehow find a way to maintain that, that application always stays on top? Sorta like you have a ghost program running ontop of everything else.
-
Wouldn't that cause problems with the other program that you work with? let's say if you play a game or something.