Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Keyboard shortcuts not working for services

Hi.


I'm using 10.8.3


I've created a service in automator that runs an applescript. It works when I launch it from automator (it's to set a flag and background colour to a message in mail.app).


I followed these instructions, but the keyboard shortcut doesn't work. I've tried it with a number of different shortcuts and none of them work. Any ideas?


1. Create a new Automator workflow. Choose a "Service" template.

2. Configure it so that Service received "no input" in "any application". This will ensure that this service is always visible in any application (you might want to limit the service to a specific app, but I won't for this example)

3. Add a "Run AppleScript" object into the workflow.

4. Enter the Applescript you want

5. Save the Service and name it something descriptive, short, and unique so that it will work as a Keyboard Shortcut.

6. Open the Keyboard Preference and select the "Services" item in the left side of the Keyboard Shortcuts pane.

7. Scroll down to the "General" heading at the bottom of the list on the right side of the Keyboard Shortcuts pane.

8. Find your new Service and activate it (by checking it's checkbox).

9. Assign a keypress shortcut by clicking on rightmost part of that row and pressing the key you want.

Posted on May 20, 2013 2:00 AM

Reply
16 replies

Mar 19, 2017 2:09 AM in response to myklehansen

Have you perhaps found a solution in the meantime ?


Here same problem running MacOS Sierra 10.12.3.


Your workaround seems to always be solving the problem. Thank you for sharing.

And we all realize that the worksaround is cumbersome and not helping simplification and automation of the worksflow)...


MyKleHansen: "The keyboard shortcuts for services don't work in any given app *until* I open the Services menu in the menubar.


I don't actually have to run the Service from the menubar for the shortcut to start working. I just have to show the menu.


However, I have to do it once for each application that's open!"


Is this a long-living bug or are there new insights how to work with hotkeys and servics without getting the issue ?

Dec 28, 2013 6:30 AM in response to jenbenn-singapore

I have the same problem on my mac mini with 10.6.8.


I have created a service in automator works without problem, saved it, found it in keyboard shortcuts and added a shortcut.


First of it didn't work, rebooted the mac and it worked fine, then I watched tv for a while got back tried the shortcut and its not working any more...standard shortcuts still work, tried deleting the plist and reboot, it worked first time I tried but then it stopped working again...***...

Mar 30, 2014 7:32 AM in response to nysus

I have done all of these things and nothing seems to fix it. The sevice I created in Automator works fine when started from the menu, but the shortcut keys assigned in keyboard preferences do not. I see a brief flash of the application name in the menu bar (as if it tried to activate the menu), but nothing actually happens. I've activated it through finder, I've rebooted, nothing seems to make it work.

Oct 13, 2015 9:36 AM in response to jenbenn-singapore

I can confirm this is still a bug in 10.10.5 . The keyboard shortcuts for services don't work in any given app *until* I open the Services menu in the menubar.


I don't actually have to run the Service from the menubar for the shortcut to start working. I just have to show the menu.


However, I have to do it once for each application that's open!


I suspect that the OS X menu framework is somehow delaying the construction of the Services list for each app until the user looks at it, and the keyboard shortcuts aren't registered until that happens.


Soon I'll upgrade to the latest OS X and see if this is still an issue.

Oct 18, 2015 1:14 PM in response to myklehansen

And, did an upgrade to El Capitan do it for you? Because for me it did not 😐. I still have to view the created service (running a terminal in my case) in the finder services menu before the actual shortkey works.


With all due respect, but how come Apple has not addressed such a seemingly trivial thing in the last couple of years?

Feb 3, 2016 4:44 AM in response to MacRolands

Hello, everyone!

I faced the same problem on El Capitan. And I believe the MacRolands' answer helped me.
So I opened "Automator" and renamed my service "Launch iTerm" to "Launch_iTerm" and saved it. Then (just in case) I decided to run the service via Finder -> Services -> Launch_iTerm (before using a hotkey). Then I quited iTerm (Command+Q) and after that I tried the hotkey (Control+Option+T, in my case) and voila, iTerm was launched.


Hope this will help somebody.

Apr 9, 2016 9:31 AM in response to ditransler

Still no go. Getting very frustrated. 10.10.5. The Automator script is a very simple one for Numbers:


on run

set date_ to ((current date) as string)

set the clipboard to the date_

tell application "System Events" to keystroke "v" using command down

end run


The script works from the drop-down menu, but the keyboard shortcut in System Preferences does not work.


If I'm supposed to "initialize" a script in order to then make the shortcut available, can someone please post a list of where/how I must first initialize the script? I get the impression it's:


1. Using Finder, run the script

2. Using the app you want, run the script from the menu

3. Close the app

4. Reboot the Mac

5. (then try the keyboard shortcut in the app)

Apr 9, 2016 9:36 AM in response to santranyc

Got it to work!


The shortcuts I was using—⌃+⌘+D and ⌥+⌘+D—were, unbeknownst to me, being used by something else, probably OS X for the Dock (I saw it move at one point when running the shortcut). I don't know why these conflicts didn't show up in System Preferences, Keyboard, Shortcuts, Keyboard…they are supposed to show up there. I never would have figured out it was a keyboard conflict except by trial and error.

Keyboard shortcuts not working for services

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.