I’m using a macro that sends the right arrow key to Keynote using the “Type a Keystroke” action. This enables me to advance to the next Keynote slide even if Keynote isn't the foreground application. However, it also insists on sending this same keystroke to whatever application has the focus.
To be clear, I want to send the keystroke to Keynote in the background but not send the keystroke to the app that currently has the focus. Is this possible?
Instead of sending a keystroke, send the menu command. As long as this Macro is in an active group it will work even if Keynote if not the foreground app. (The slideshow needs to be in a Window rather than fullscreen - but that would be the case if another app is in the foreground.)
That's was what I was doing previously. However, it didn’t work reliably. Also, it doesn't advance to the next build but to the next slide. The right arrow key advances to the next build. Thanks.
The Type a Keystroke action, when you use the Send To option, sends the keystroke only to that application. It does not send it to the front application.
I just double checked and verified this with the Right Arrow sent while in a Mail message to BBEdit, and it works as expected, so I suspect something else is going on for you.
Hang on, if you are using the AppleScript, and that works, then where is the keystroke coming from?
Maybe what we need is an option not to pass through the keystroke generated by the device itself. Another option would be a toggle that would allow the user to choose whether or not to pass the keystroke through.