Get the key event after losing focus

Hello guys!

I want to implement a feature that I can still get key events when the focus is not on the current window, but I am having trouble now. I found an example on github, but I put the java code and jar file into my project file but it still doesn’t work. I have the following error report, I hope everyone can help me

No library found for org.jnativehook
No library found for org.jnativehook.dispatcher
No library found for org.jnativehook.mouse
No library found for p5nativehook
Libraries must be installed in a folder named ‘libraries’ inside the sketchbook folder (see the Preferences window).
The package “org.jnativehook” does not exist. You might be missing a library.

Can you share the file/folder structure, basically how you installed the library? Is it in the libraries folder or in the sketch folder?

Sometimes it helps when you drag the jar-file
of the library onto the processing IDE Editor Window

No joke.