Ensemble icon indicating copy to clipboard operation
Ensemble copied to clipboard

Keystrokes not passed into application running on AVP

Open billyjacoby opened this issue 1 year ago • 3 comments

When having a window selected and, the keystrokes that I'm making on a keyboard attached via Virtual Display are not passed into the relevant window.

I'm testing this on an actual AVP not the simulator. The keystrokes from my keyboard are definitely getting sent through the AVP and not directly to the mac, since there's no input at all when focused on an Ensemble window.

billyjacoby avatar Feb 15 '24 20:02 billyjacoby

Sorry, I don't understand. Where are the keystrokes going?

saagarjha avatar Feb 18 '24 14:02 saagarjha

I'm not exactly sure myself, but they're not going to the selected application via the Ensemble window or to the host computer.

To reproduce:

  • I connected to my MacBook via built in VisionOS Screen sharing
  • Opened the terminal application running on my MacBook via Ensemble in VisionOS
  • Focused on the Terminal VisionOS window and tried typing with my MacBook's keyboard (connected via universal control from the screen sharing)

Keystrokes didn't show up in the Terminal application, even though it was definitely selected and active.

billyjacoby avatar Feb 18 '24 14:02 billyjacoby

I take it that you've given Ensemble on macOS the appropriate permissions, made sure Terminal is focused on macOS, and have actively focused and are looking at the Ensemble window for Terminal in visionOS as you're doing this? If so I would put a breakpoint here and make sure it is getting hit: https://github.com/saagarjha/Ensemble/blob/f6aa6ed80407028ce40c6ea31969b124bc215c48/macOS/EventDispatcher.swift#L67

saagarjha avatar Feb 18 '24 14:02 saagarjha