My automator service is as follows:
Workflow receives no input in Google Chrome.app Input is entire selection (checkbox not checked)
Run Applescript
on run {input, parameters}
tell application "Google Chrome" to activate
tell application "System Events"
keystroke "i" using {control down, option down}
keystroke "r"
end tell
return input
end run
In Security & Privacy -> Privacy -> Accessibility, both Automator and Google Chrome are listed and checked, and under Automation, Google Chrome has System Events.app checked.
With Google Chrome open (specifically on a Google Sheets tab), this works:
- When I run the step from Automator
- When I run the entire service from Automator
- When I run the service from the Chrome menu
However, it does not work when I use the keyboard shortcut I assigned in System Preferences: command+option+control+n. A cogwheel briefly appears in the menu bar then goes away, and I even added a notification center action to tell me the service ran (it does) - but nothing happens in Google Sheets. I have tried other keyboard shortcuts to no avail.
Any help appreciated. Honestly if Google would just add a two-stroke "insert row" hotkey, that would relieve me of this whole idiotic exercise :)