I wrote a few hotkeys for mouse control. I put them in a group, and I have other hotkeys for activating and deactivating that group. Previously deactivating the group worked fine, but once I upgraded to Sonoma I noticed that the O.S. "defocuses from" the front window upon deactivating the mouse group... i.e. it won't receive keystrokes and I get an error beep when typing.
I quickly tried adding some code to raise the "front window of the front application" in my macro that deactivates the group, and that seemed to fix it.
But I haven't tested it much. I'm wondering if this sounds like the correct solution.
I'm also wondering why this behavior change happened when upgrading to Sonoma.
I can provide code if necessary, although I'm not sure how you would want me to upload it to this forum.