You can create a custom keyboard shortcut to put your MacBook into Sleep mode without closing the lid by following these steps:
- Open System Settings (or System Preferences on older macOS versions): You can do this by clicking the Apple menu in the top-left corner of your screen and selecting "System Settings" (or "System Preferences").
- Navigate to Keyboard: In the sidebar, click on "Keyboard."
- Go to Keyboard Shortcuts: Click the "Keyboard Shortcuts..." button at the bottom of the Keyboard settings.
- Select App Shortcuts: In the left-hand column of the Keyboard Shortcuts window, select "App Shortcuts."
- Add a New Shortcut: Click the "+" button below the right- hand column.
- Configure the Shortcut:
- Application: Make sure "All Applications" is selected this is usually the default.
- Menu Title: This is crucial. You need to type the exact name of the menu item that puts your Mac to sleep. Go to the Apple menu (top left of your screen) and look for "Sleep." It's usually just "Sleep." Type exactly "Sleep" (without the quotes) into the "Menu Title" field.
- Keyboard Shortcut: Click in the "Keyboard Shortcut" field and then press the key combination you want to use for sleep. A common and convenient one is Control + Shift + Eject (if your MacBook has an Eject key) or Control + Shift + Power button (on newer MacBooks without an Eject key). You can also choose something like Control + Command + S if you prefer (which I did). Just make sure it's a combination you won't accidentally press often.
- Click Done (or Add): Once you've entered the menu title and your desired shortcut, click "Done" (or "Add" on older macOS versions).
Now, whenever you press your newly created keyboard shortcut, your MacBook should go into Sleep mode without you having to close the lid.