0

I have been searching for an answer for my problem for a while now, but I can't seem to find an existing question on the topic.

I am creating a voice chat program with Java for private use in gaming. The only problem is that it would be very painful to swap windows every time you want to talk (the program is required to be push to talk only). So, I need to be able to have a key bind for activating the voice transmission while using another application; Java needs to be in the background (not the window under focus). I have not found any answers that work with a non-focused window.

Any help will be appreciated!

Zakru
  • 92
  • 1
  • 11
  • 1
    Thats because Java runs in the JVM, not on your system. There is no easy way to achieve what you want in Java. You will most likely need some special .dlls and then you start ruining Java's cross-platform ability – Chris Jul 24 '17 at 14:14
  • 1
    JNativeHook is what I use in a program that is required to have a global input listener https://stackoverflow.com/a/19480853/2764866 – Wietlol Jul 24 '17 at 14:16
  • @Wietlol Thanks! That seems to be exactly what I need. – Zakru Jul 24 '17 at 14:38

0 Answers0