The Functions Framework for Java uses Java and Maven (the mvn command), for building and deploying functions from source. However, it is also possible to build your functions using Gradle, as JAR ...
JNativeHook is a library to provide global keyboard and mouse listeners for Java. This will allow you to listen for global shortcuts or mouse motion that would otherwise be impossible using pure Java.