1

I'd like to press a custom set of keys (i.e. CTRL+`) to instead act like I am pressing a different set of keys (i.e. CTRL+]).

How can I accomplish this? In the keyboard shortcuts menu I'm only seeing ways to set keyboard keys to launch applications or change how the modifier keys work.

  • What does Control ] do for you now? – Tom Gewecke Aug 13 at 14:08
  • Well, in general, nothing. This is a silly request, but one of the web applications I use uses that key combination to do something. My keyboard doesn't have a Ctrl key on the right side and I can't reach Ctrl ] with one hand, so I wanted to remap it... :) – ardavis Aug 13 at 14:20
  • To change the shortcut assigned to an App's menu command, go to System Preferences > Keyboard > Shortcuts > App Shortcuts and add it there, giving it the keyboard shortcut you want. – user3439894 Aug 13 at 14:29
  • It's a website, not an app. Unfortunately there is no menu command for it. I simply want pressing 2 buttons to act as if I'm pressing 2 other buttons. Thank you though! – ardavis Aug 13 at 14:37
  • Can you share the URL? – user3439894 Aug 13 at 14:40
1

This may be a viable solution, you'll have to give it a try and see:

  • This answer uses Safari as the browser, change as needed.
  • The Service1 was named Collaborator Keystroke, change as wanted.
  • The keyboard shortcut assigned to the Service is ^`, change as wanted.

For the Automator Service1:

Use the image below for the settings.

ApplesScript code:

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

enter image description here

For System Preferences > Keyboard > Shortcuts > Services:

enter image description here

Note: Sometimes with an Automator Service1 and assigning a keyboard shortcut, you may first have to trigger it from the target App's Services menu one time. From then on the keyboard shortcut should work normally.

1 In macOS Mojave an Automator Service is called a Quick Action.

  • This works great but I'm nervous about one caveat. It wants me to allow Google Chrome to be able to control my computer when I attempt to run the script. I thought that this would have been at the system level before Chrome (or any other application, I tested it in TextEdit as well and it also required permission) gets the input. I feel it may not be secure to allow Chrome to have Accessibility permissions. – ardavis Aug 13 at 17:03
  • 2
    @ardavis, I've been using OS X/macOS for 13 years and have never had an issue giving any application accessibility access, including Google Chrome. I have never had a malicious incident in doing so and I have hundreds of script and services I created and used over the years! – user3439894 Aug 13 at 17:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .