How to add custom keyboard shortcut for a nested menu item?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game Looping
--
Chapters
00:00 How To Add Custom Keyboard Shortcut For A Nested Menu Item?
01:18 Accepted Answer Score 7
02:07 Answer 2 Score 40
02:34 Thank you
--
Full question
https://superuser.com/questions/177574/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#macos #keyboardshortcuts
#avk47
ANSWER 1
Score 40
You can specify the shortcuts like Format->Indentation->Increase
in 10.8 (thanks @JohanKaving), or >Format>Indentation>Increase
in 10.7.
Another option would be to assign a shortcut to a script like this:
tell application "System Events" to tell process "Terminal" to click menu item "Pro" of menu "New Window" of menu item 1 of menu "Shell" of menu bar 1
ACCEPTED ANSWER
Score 7
There are two answers here, depending on exactly what your question is:
If what you want to do is just what your example states, try this:
- Launch Terminal, and open its preferences ⌘,.
- In the Settings preference pane, select Pro in the left-hand column.
- At the very end of the left-hand column, click the Default button.
At that point, you'll find that ⌘N now opens a new window in your preferred style, and ⌘T does the same for a new tab.
If your example was just an example, and it's some other app where you want to add a keyboard shortcut, you should be able to do it via System Preferences → Keyboard → Keyboard Shortcuts → Application Shortcuts → +.
As @Nano8Blazex said, you can usually just enter the name of a nested shortcut and it will work fine.