Question about

December 16th 2013 6:28 pm

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.

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

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

11 users following this question, including:

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

This question has been viewed 6301 times.
Last activity .