How do you create a keyboard shortcut for signing documents in Preview?
So how does one create a keyboard shortcut for signing in Preview (i.e. Preview.app)?
The primary problem I'm seeing with the system shortcuts tool (Preferences > Keyboard > Shorcuts > App Shortcuts) is that the signatures Preview uses are listed in the menus as graphical representations of themselves, and can't be referenced with the "Menu Title" field when assigning a keyboard shortcut.
Maybe an AppleScript or some other clever means of making this work?
I'm all ears!
tell application "Preview" to activate
tell application "System Events" to tell process "Preview"
click menu item 1 of menu 1 of menu item "Signature" of menu 1 of menu item "Annotate" of menu 1 of menu bar item "Tools" of menu bar 1
Change "click menu item X" at the beginning of the third line to whatever place your preferred signature is in
Edit: Be sure to give Automator permission to do stuff:
System Preferences > Security & Privacy > Privacy > Accessibility > check Automator
- Create a new Automator Service > click
Variables > ApplescriptActions > Run Applescript > Paste the code from above
- Near the top, find 'Service receives XXX in YYY'
- Set YYY = Preview
Drag the variable into your main workspace window.
- Save. Run.
- If it works, head back over to Keyboard Shortcuts > Services.
- If you left XXX blank like me, you'll find your Service under General.
- Give it a shortcut, restart Preview.
Last edit in case my awful writing is too awful:
Clicking the mark as good answer button helps us highlight the best answers.
Edit: Updated with new info. Thanks @robotspacer
So the same as above, grant both Automator and Preview assistive access via System Preferences > Security & Privacy > Privacy > Accessibility.
11 users following this question, including:
This question has been viewed 2431 times.
Last activity .