Closed alopecoid closed 6 months ago
macOS 14.2.1 (23C71)
Is that a version of a host OS? If so, what is the version of the macOS running in guest?
The reason I'm asking because --capture-system-keys
works just fine for me, both for Command + Space bar and Command + Tab.
I'm running macOS 14.0 (Sonoma) guest on a macOS 14.2.1 (Sonoma) host.
Hi,
Easy to miss, but I mention this in the original post:
I am running the same version of macOS on both host and guest [...]
...so both host and guest are running macOS 14.2.1 (23C71)
.
Thank you!
Thanks for the clarification.
...so both host and guest are running
macOS 14.2.1 (23C71)
.
I've just installed macOS 14.2.1 using tart create --from-ipsw=latest <VM>
, started it with tart run --capture-system-keys <VM>
command-line argument, and everything works just fine.
Honestly, I have no idea what could be different with your setup.
I've also tried to reproduce with no luck. I wonder if you have changed any preferences in the Keyboard
section? Also are you using an external keyboard?
I think you are correct; this seems to have something to do with keyboard configuration. As mentioned in my original post, I am experiencing similar problems in both UTM
and VirtualBuddy
. So I went back to my UTM
configuration and in the Virtualization
section swapped the Keyboard
from Generic USB
to Mac Keyboard (macOS 14+)
. After some rudimentary testing, everything seems to work correctly. This is unintuitive (to me), as the keyboard I'm using is indeed a "generic USB keyboard" and not a Mac keyboard. My guess is that if the generic keyboard is configured correctly on the host, it will "look like" a Mac keyboard on the guest, which seems to be the case because when set to Mac Keyboard (macOS 14+)
, both the built-in MacBook keyboard and the external generic keyboard work as intended on the guest.
Peripheral thought: This makes me wonder if certain other input settings are always "relative" across the guest and host systems; for example, scroll/tracking speed settings, etc. And if so, are these "additive" or "multiplicative" if adjusted to non-default values on the guest?
Anyway, all that said, I'm not exactly sure how to apply this newfound knowledge to Tart
. In other words, while in UTM
I explicitly (and apparently incorrectly) set my keyboard configuration to Generic USB
, I did not explicitly set any keyboard configuration for Tart
. So the problem seems inverted; by default UTM
seems to configure the external keyboard correctly, while Tart
does not. Forgive me if I'm missing something obvious, but where does one configure the keyboard in Tart
? I couldn't find any mention of it in tart help
, in the online docs, or from a search through the GitHub repo.
Thank you!
Interesting findings! Thanks for sharing!
Tart uses the Mac keyboard by default on Sonoma hosts like yours:
We kept the Generic
one for compatibility with macOS Monterey.
On that note, could you please try to run a suspendable VM via tart run --capture-system-keys --suspendable
? This way you Sonoma VM will get only one keyboard:
Closing since can't reproduce. :-(
Hi,
The flag
--capture-system-keys
doesn't seem to work; the macOS guest doesn't seem to capture the keys adequately from the macOS host. For example, CMD+Tab (to bring up the App Switcher) and CMD+Space (to bring up Spotlight) both execute on the host versus the guest. I am running the same version of macOS on both host and guest (see below).I have also noticed this behavior when testing
UTM
andVirtualBuddy
, so I assume that this is an issue inherent within Apple's underlying virtualization framework. However, I also assume that--capture-system-keys
was meant to somehow work around the issue, otherwise could its purpose be clarified? (This issue withinUTM
is actually what led me to trytart
, in the hopes thattart
figured out some clever way around it).Using
--vnc-experimental
instead does indeed seem to work around this issue, however UI latency is noticeably slower in this mode, so I would prefer to avoid it.Thank you!