I’m trying to make a kind of a keylogger in Java. I got an app that allowed people to get their RSS feeds on their desktop and I want to make a quick access.
By the way, I need something that can do that:
- I start my java jar file and it minimized in the system tray.
- The user does what he wants to do (Surfing, Watching movies, etc…).
- He pressed a key combination (CTRL + I) and then the java window opens and displays a GUI where he can check for news and modify app configuration.
- Now he can minimize the window (System tray icon) and keep using his computer normaly.
My app has to be totally cross platform. All things are done except this feature.
I’ve tried to do it with KeyStroke and even System.in but they only catch key combination when the user has the window as active.
So, is there a way to catch key combination from outside the app (Like a transparent overlay) without using JNI or JNA (That’s what my searches gave me).
Thanks for your help.
No, you’ll have to drop to some system dependent library, i.e. use some form of JNI.
The different built-in levels of granularity are: