You can do this with an Automator Service and the global Keyboard Shortcuts 
system preferences. Check out the Stack Exchange article below.

https://apple.stackexchange.com/questions/175215/how-do-i-assign-a-keyboard-shortcut-to-an-applescript-i-wrote

Open Automator and create a new Service. Set the input to No Input. Add a Run 
AppleScript action with this AppleScript.

tell application "BBEdit"
        activate
        open scratchpad document
        set the index of the window of scratchpad document to 1
end tell

Save that as as "Scratchpad.workflow" or something similar.

Now, go into System Preferences and open Keyboard and the Shortcuts tab. Select 
Services and scroll down to General. Your new service should be listed there. 
Assign it a keyboard shortcut. I assigned it to Command-` and it does seem to 
work.

[fletcher]


> On Sep 1, 2017, at 8:41 AM, Brian Christiansen <[email protected]> wrote:
> 
> Hello,
> 
> I use the scratchpad all day long… I compose messages for pretty much 
> anything there first, before pasting them into email, Slack, Basecamp, web 
> forms, whatever. I would love a universal keyboard shortcut that could be 
> triggered from any app or the Finder that would bring me the Scratchpad 
> instantly. 
> 
> I thought I might be able to create one in Sys Prefs > Keyboard > Shortcuts, 
> but I struck out. I experimented with LaunchBar's ability to trigger 
> services, and there is an "Append to BBEdit Scratchpad" service, but 
> unfortunately, it takes its service very literally… it'll append the 
> selection, but it won't make the Scratchpad visible.
> 
> Does anyone have something to do this currently? Thanks!
> 
> P.S.—this message was written on the Scratchpad.
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/bbedit.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to