Detecting a Mouse Click Anywhere on Screen with Java

前端 未结 1 781
攒了一身酷
攒了一身酷 2021-01-26 02:05

Is it possible to detect a mouse click anywhere on a screen, outside of my application?

I have written an application to do this in C#, but would like to write a version

1条回答
  •  天命终不由人
    2021-01-26 02:20

    You can do this only with platform specific implementation of the OS API, as you can't detect clicks outside from your program in your program itself.

    While you won't get around writing platform specific code, just abstract it as an interface and use different implementations appropiately.

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