Question about
ryan

How do you create a keyboard shortcut for signing documents in Preview?

I sign a lot of documents on my Mac, and Preview's built in signature tool is a pretty fantastic, lightweight means of doing so. The only problem is it takes numerous clicks to get to initiate a signing, which can get pretty annoying.

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!
top answers
ryan's pick
4lex

So the following chooses the first sig you have saved:

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
end tell

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 > Applescript Actions > 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.
Good Luck

Last edit in case my awful writing is too awful:

mark as good answer

6 people like this answer

Clicking the mark as good answer button helps us highlight the best answers.

sort by

0 more answers
share:

11 users following this question, including:

  • caseyferrier
  • robotspacer
  • 4lex
  • Wagnel
  • skyman375
  • dotEvan
  • dave
  • ryan
  • Patrick
  • daleam

This question has been viewed 2805 times.
Last activity .