Sunday, November 25, 2018

Create a keyboard shortcut for Menu action in Mac OS X

While I was using my Hackintosh, I noticed that some menu items do not have keyboard shortcuts defined. Some menu items have keyboard shortcuts, but need special keys.
As an example, If you want to select Sleep menu item, there is a special key combination where one of the required keys "Eject" is not available in typical keyboards. However if you have Mac OS compatible keyboard, this will not be an issue.

There are multiple ways to overcome this. The easiest way I found was adding a new keyboard shortcut using system preferences. No additional software or scripting required.

These are the steps I followed to create a shortcut to Sleep menu action,


1. System Preferences -> Keyboard ->  Shortcuts
2. Select "App Shortcuts" from the left pane
3. Click on + (plus) sign
4. Select "All Applications" for "Application" option
5. Type "Sleep" for "Menu Title" Option
6.  Use your preferred key combination for "Keyboard Shortcut" option. I used Command + F12
7. Click on Add button

Adding a custom keyboard shortcut for Sleep menu action


That's it. Command + F12 will be shown as the keyboard shortcut for Sleep in the menu now,

Command + F12 keyboard shortcut assigned for Sleep menu action

No comments:

Post a Comment