Force Unity app to recognize key presses when application is not in focus?
TL;DR My app doesn't recognize key presses when the application is not focused, but it will recognize the mouse position, which makes me think there's a way to get it to listen to keys too. How can I force it to recognize both?
My code has targetJoint2Ds follow the cursor. When my cursor leaves the Unity window, this still functions. Even when I click outside, bringing the focus on other windows , this remains true, and my app still works. Not so for keyboard inputs; if another window or program is in focus, the key presses will be lost on my Unity app. How can I force my app to recognize any keyboard input, regardless of whether or not the Unity app is in focus?
Comment