Creating a shortcut for PDF menu in Print dialog

I'm trying to create shortcuts to various items in the Print dialog box, to trigger actions in the PDF dropdown menu. I want to have, for example, ⌘-Y for Add to Yoink, ⌘-D for Add to DEVONThink, etc. BUT I don't want the ⌘-Y shortcut to be active unless the Print dialog box is on-screen.

In the normal System Preferences pane for Keyboard Shortcuts, this is possible by creating an App Shortcut and typing out the menu name. The System Prefs seems to be clever enough to only grab the ⌘-D or ⌘-Y or whatever when the Print dialog is on screen.

If I setup a Keyboard Maestro shortcut for ⌘-D, the problem is that it no longer works as a shortcut in the other applications which already make use of ⌘-D as a hotkey, because Keyboard Maestro seems to gobble the hotkey. Additionally, I can't figure out how to make Keyboard Maestro trigger a dropdown menu item in a dialog box.

While the System Preferences version works, I'm of course trying to keep all my keyboard shortcuts etc in Keyboard Maestro. Is there any way to replicate the system behaviour in Keyboard Maestro?


Screenshot 2022-06-09 at 2.59.33 PM

This is why my advice is to keep using System Preferences for this.

Like you, I aim to have Keyboard Maestro handle as many of my shortcuts as possible but there are a few situations where it works much better to either set the shortcut in an App or through System Preferences.

One of the really robust things about setting the Save as PDF (or another variation of Save a PDF) shortcut this way is that (as you say) it has no effect if a Print Dialog box is not showing. In my case I have used System Preferences/Keyboard/Shortcuts/App Shortcuts to set the Save as PDF shortcut as ⌘P

This feels like it shouldn't work as ⌘P is also the Mac Shortcut for Print. But what happens is that the first time you press ⌘P the print dialog opens and then pressing ⌘P a second time Saves to PDF. I have never found a more convenient workflow than this which is why it is just about the only shortcut I set in System Preferences when I get a new Mac.

2 Likes

Holy Cow. Finally an easy way. I've wasted so much time.

1 Like