https://github.com/melloware/jintellitype
package sample.main;
import com.melloware.jintellitype.HotkeyListener;
import com.melloware.jintellitype.IntellitypeListener;
import com.melloware.jintellitype.JIntellitype;
public class jnatest {
public static void main(String[] args) {
JIntellitype.getInstance().registerHotKey(1, JIntellitype.MOD_ALT, (int)'A');
JIntellitype.getInstance().addHotKeyListener(new HotkeyListener() {
@Override
public void onHotKey(int i) {
System.out.println("134234234234");
}
});
}
}
注意dll文件的位置固定的