Continue receiving keyboard events/status even when the composition is not the active application

…Or at least an option to continue receiving this data.

I see four ways to implement this:

  1. Add a new input port on mouse or keyboard related nodes (such as Receive Mouse Moves) with a boolean value for allowing the data to continue being received by the composition;
  2. Add a new input port on a window related node with a boolean value for allowing the application window to continue allowing mouse or keyboard data to be received by the composition;
  3. Create a vuo.window node that allows a composer to set this behaviour for an application window; or
  4. Create separate mouse or keyboard nodes that will continue to send this data regardless of whether the composition is the active application.

I see 3 as the best option, as it would not require the addition of new nodes or the addition of new ports on existing nodes, but rather a single new node that would plug into a window node in the same way that Change Fullscreen Status and related nodes already work.

In addition, a way to further extend this idea is to also allow the composer to control whether this would also apply if the window were minimized, or if the application were hidden. These properties could be implemented on the same vuo.window node.

Your option #1 actually sounds pretty nice. It would be more flexible than option #3, since you could create multiple Receive nodes, each having a different local/global setting. (The fact that #1 requires adding a port isn’t a drawback that I know of, since adding a port doesn’t cause any problems for existing compositions.)

Just to let you know, monitoring other applications’ keyboard events on macOS is mediated by the accessibility system. In order for an application to track keyboard events destined for other applications, the first application needs to be trusted for accessibility or accessibility needs to be enabled system-wide. “Trusted for accessibility” means that the user needs to go into System Preferences > Security & Privacy > Privacy > Accessibility and add the app there. In other words, the user needs to give permission for VuoCompositionLoader and any apps exported from Vuo to spy on other apps’ keyboard events. (Source: Apple’s documentation on Monitoring Events)

Anyway, I’ve opened this feature request for voting.

@jstrecker, I didn’t know about the security settings to allow this for keyboard access. Is there the same limitation on mouse movements/clicks?

No, just keyboard.

Ugh, I just used 7 votes on this and it’s already chosen for implementation in this other feature request. Ability to get mouse coordinates, when not active window

Which I should have remembered because I commented in the other FR earlier this month that they were similar.

Chris,

We refunded your 7 votes, and fixed an issue where some feature requests didn’t show up on the feature request page.

Yes, thank you! I saw that. Much appreciated.