Track hardware input (keyboard, trackpad, etc.) in visionOS app during Mac Virtual Display usage?

Hi,

I'm experimenting with how my visionOS app interacts with the Mac Virtual Display while the immersive space is active. Specifically, I'm trying to find out if my app can detect key presses or trackpad interactions (like clicks) when the Mac Virtual Display is in use for work, and my app is running in the background with an active immersive space.

So far, I've tested a head-tracking system in my app that works when the app is open with an active immersive space, where I just moved the Mac Virtual Display in front of the visionOS app window.

Could my visionOS app listen to keyboard and trackpad events that happen in the Mac Virtual Display environment?

Track hardware input (keyboard, trackpad, etc.) in visionOS app during Mac Virtual Display usage?
 
 
Q