I would like to write an application where the keybindings are specific to the location of the key on the keyboard, not the character they are mapped to. For example, the ke
As MadProgrammer said: You have to use JNA or JNI. You can also have a look at those projects:
JIntellitype is a Java API for interacting with Microsoft Intellitype commands as well as registering for Global Hotkeys in your Java application. The API is a Java JNI library that uses a C++ DLL to do all the communication with Windows.
There are similar projects Linux and Mac OS X.
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. To accomplish this task, JNativeHook leverages platform dependent native code through Java's native interface to create low level system wide hooks and deliver those events to your application.
Windows only, capable of Win 7 / 8 (32 and 64 bit)