Page 1 of 1

MacOS – Create a “Sleep” Keyboard Shortcut on a Windows Keyboard

MacOS – Create a “Sleep” Keyboard Shortcut on a Windows Keyboard
   2

Some of you may be familiar with the problem … no sleep button on your keyboard.

You have a really nice Mac, but you’re using a Windows keyboard since there is no MacOS keyboard that you really like.
I’m using a keyboard from Havit (you can find it here).

One of the things I hate about this setup is that I have no key or key-shortcut to put my computer to sleep.
When you look at the Apple reference, you’ll only find keys that cannot be found on your Windows keyboard, like the Eject key, or the Power key.

So in this article, I’ll show you, without the use of special software, how I have created a keyboard shortcut to put my Mac Pro to sleep, using a Windows keyboard.




Sleep shortcut for MacOS on a Windows Keyboard

With every keyboard that comes with a Mac, has the option to put your Mac to sleep with a simple keyboard shortcut.

The most common methods for putting your Mac to sleep are (reference):

  • Press the power button for 1.5 seconds
  • Option–Command–Power button
  • Option–Command–Media Eject button
  • Control–Power button (will ask what you want – not for use with a touch bar)
  • Control–Media Eject button (will ask what you want)

Just to name a few.

Commonly, you will not find these keys on a Windows keyboard – which is where our problem started.

p.s. I use this Havit Mechanical Keyboard (HV-KB395L) and can highly recommend it if you’re looking for a great and affordable mechanical keyboard. It’s nice and has a very low profile, has great tactical feedback and .. you can set the backlight of the keys to whatever you like. No special software or drivers on your Mac needed. I even stopped using my much more expensive Mac version of “Das Keyboard” (which is a great keyboard as well, just a little to high for my taste).

Creating a “Sleep” shortcut

There are powerful tools out there that can assist in remapping keys and help you do this when using a Windows keyboard with your Mac.
Karabiner (also known as KeyRemap4MacBook) is such a powerful tool, recommended for more advanced purposes, and it is for free.

However, I do not like installing yet another tool, especially for a simple task like this one.

One of the cool thing with MacOS is that you can define your own keyboard shortcuts, per application or system wide. This is what I have used to create my “sleep” shortcut.

1) Define a key combination for your “Sleep” shortcut

One of the things you have to determine is: what key combination do I want to use to put my Mac to sleep?
You’ll have to make sure it’s not used for anything else (system or application wise) – to avoid conflicts and unintended side effects.

I picked this key combination: Shift  + Ctrl + Alt + F12

This combination has not caused any conflicts so far (knock on wood) and the F12 key is a rare key for MacOS to begin with.

2) Finding the “Sleep” menu item in the Apple Menu

Before we start defining the keyboard shortcut, we will need to determine what the sleep function is called in the Apple Menu ( ) of your Mac.
For each available language this may be called something else.

Below an example of a Mac running in English.

MacOS - Menu item "Sleep"

MacOS – Menu item “Sleep”

In the English language (which is what I use), my Mac lists it as “Sleep” (mind the uppercase “S”).
With a Mac running with the Dutch language, this is called “Sluimeren” (who ever came up with these weird translations?).
A Mac running the German language, would call it “Ruhezustand“.

Write down what the “Sleep” option is called on you Mac! 
From here on, I assume you’re working in English and the word in the menu is called “Sleep” – don’t forget to use the word seen on your Mac.

If you see keyboard symbols behind the “Sleep” menu option…
Your Mac already has a shortcut defined for your keyboard, and you may not need this tutorial, unless you have a second keyboard attached (for example with a laptop) that does not accommodate this shortcut.

3) Actually creating the “Sleep” keyboard shortcut

To create a keyboard shortcut, we will have to open System Preferences where we open the Keyboard options: Apple Menu ( System Preferences… . A window like this one, will open.

MacOS - System Preferences

MacOS – System Preferences

In the window show above, select the “Keyboard” option, which will provide access to the keyboard preferences.

In the “Keyboard” window, select the “Shortcuts” tab, followed by clicking the “App Shortcuts” and finally clicking the “+” button.

MacOS - Keyboard Shortcut Preferences

MacOS – Keyboard Shortcut Preferences

A small window will now open. Here we need to pay attention …

MacOS - Sleep Keyboard Shortcut

MacOS – Sleep Keyboard Shortcut

 

First we need to make sure the field “Application” is set to “All Applications” – after all, we’d want the sleep function to kick in, no matter what application we have open.

The field “Menu Title” is the one that is trickier. It should be the name as it appears in any menu.
So in my case I will use the word “Sleep” (English MacOS), which we found in the Apple Menu. You did write that one down if you’re using a different language – right? So in Dutch “Sluimeren” and in German it’s “Ruhezustand”. Double check the word if needed.

Finally we have to enter the desired keyboard shortcut. Click the field next to the text “Keyboard Shortcut:“, and press the key combination you’d like to use. If you mistyped, simply press a new combination again.

Again: I use Shift + Ctrl + Alt + F12 , which has served me very well in the past few months.

Finally click the “Addbutton and you list should look something like this (if you made a mistake – simply click the minus “” button and try again):

MacOS - Sleep Shortcut Added

MacOS – Sleep Shortcut Added

Testing the “Sleep” shortcut

You can now, optionally, close the System Preferences window, and test your new keyboard “Sleep” shortcut.

Waking up you Mac

You can wake up you Mac, from a sleep, by pressing any key or mouse button.
I typically press Shift or the left mouse button.

Powered USB hub

If your keyboard and/or mouse are not plugged straight into your Mac, but into an external USB hub instead, then make sure the hub powered ON and your keyboard and/or mouse are ACTIVE.
My keyboard actually is “active” when the backlight is ON, but you can also see it by pressing Caps Lock, or Num Lock key, and see if the indicator on your keyboard lights up or not.

Monitor with USB hub

If your monitor has a build-in USB hub, and you use it for your keyboard and/or mouse, the same rules apply as for a powered USB hub.
Make sure you monitor is ON and your keyboard and/or mouse are ACTIVE.

Donation options


Donations are very much appreciated, but not required. Donations will be used for web-hosting expenses, project hardware or a motivational boost (a drink or snack). Thank you very much for those have donated already! It's truly AwEsOmE to see that folks like our articles and small applications.

Comments


There are 2 comments. You can read them below.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.

  • Oct 13, 2019 - 6:34 AM - Uwe Comment Link

    Hi,

    excellent detailed describtion which works very well.
    I got a Logitech K375s keyboard which works for Mac OS/iOS as well as for Window/Android for three different devices (iMac/iPhne/iPad) in one! Easy switch from one device to the other.

    Reply

    Uwe

    • Oct 13, 2019 - 9:25 AM - hans - Author: Comment Link

      Thanks Uwe! 

      I found that there is a much better selection when it keyboards offered for the Windows platform as well 
      I’m using HAVIT KB395L since I happen to love mechanical keyboards. Used to have “Das Keyboard” (still have one laying around), but this one from Havit has a better balance when it comes to noise, travel distance of the keys, and it’s super flat.

      Reply

      hans



Your Comment …

Do not post large files here (like source codes, log files or config files). Please use the Forum for that purpose.

Please share:
*
*
Notify me about new comments (email).
       You can also use your RSS reader to track comments.


Tweaking4All uses the free Gravatar service for Avatar display.
Tweaking4All will never share your email address with others.