- 下载地址
https://github.com/melloware/jintellitype - 引入jar包和按下面的层级放置dll文件
这里可以直接下载jar包
https://mvnrepository.com/artifact/com.melloware/jintellitype/1.5.6
package sample.main;importcom.melloware.jintellitype.HotkeyListener;importcom.melloware.jintellitype.IntellitypeListener;importcom.melloware.jintellitype.JIntellitype;public class jnatest{public static void main(String[]args){JIntellitype.getInstance().registerHotKey(1, JIntellitype.MOD_ALT,(int)'A');JIntellitype.getInstance().registerHotKey(22, JIntellitype.MOD_ALT,101);JIntellitype.getInstance().addHotKeyListener(newHotkeyListener(){@Override public void onHotKey(int i){if(i==1){System.out.println("134234234234");}if(i==22){System.out.println("1111");}}});}}从https://github.com/melloware/jintellitype/tree/master/src/main/resources/com/melloware/jintellitype/windows下载dll文件,注意dll文件的位置固定的
3. 无需拷贝dll文件到系统的system32里面