saagarjha / Ensemble

Cast Mac windows to visionOS
https://testflight.apple.com/join/Pq1HzHqe
GNU Affero General Public License v3.0
847 stars 37 forks source link

Keystrokes not passed into application running on AVP #33

Open billyjacoby opened 4 months ago

billyjacoby commented 4 months ago

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.

saagarjha commented 4 months ago

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

billyjacoby commented 4 months ago

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:

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

saagarjha commented 4 months ago

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