Java Keyboard/Mouse activity (even outside of my app)

后端 未结 1 555
有刺的猬
有刺的猬 2021-01-13 09:44

I need to detect when the mouse or keyboard activity is present. My application runs in the background (tray) and I need to detect this activity even when my app isn\'t in f

相关标签:
1条回答
  • 2021-01-13 10:29

    Since JNI is required, which relys on the OS specific APIs, the only way would be to have an implementation for each supported OS and load it dynamically after detecting the OS in you application.

    For Windows Java Global Keyboard/Mouse Hook – JNI

    0 讨论(0)
提交回复
热议问题