Joystick inputs on an inactive window?

Hey i have just finished a small script that shows images depending on what joystick buttons inputs you pressed, it works great!. but i notice when i click off the Window making it inactive it does not read the inputs?

i have checked
Run In Background but i don’t see any differences.

I’m wanting the user to be on another program then it shows what buttons they are pressing and be displayed on unity3d, it does work but not when its an inactive window.

please help!

This is standard behavior in a desktop environment. The active window gets input focus. This is a function of the operating system, not Unity.

Arguably the best way to do what you want is using some sort of interprocess communication. Use Unity’s networking and have the second app connect to the first and route the input to it using RPC calls.

There are also Win32 API calls to hook into input events so you can grab them and respond to them, but this would likely circumvent all of Unity’s input handling, so you’d have to deal with that.

Check out this GitHub project: GitHub - Elringus/UnityRawInput: Windows Raw Input wrapper for Unity game engine

It allows getting input events event when the application is not in focus.