Keystroke for Sleep Function

Joined
May 18, 2008
Messages
3,667
Reaction score
103
Points
63
Location
Amberley, Canterbury, New Zealand
Your Mac's Specs
MacMini 14.3, 8.1 & 4.1, OS 14.7 10.14, & 10.11 & 10.6; Macbook Pro 8.2, OS 10.12.
Mini 2023, Sonoma 14.3
I use the Sleep function regularly, and for about 1/3 of the time, the computer promptly wakes again, requiring a second, sometimes a third, attempt. The cause is quite simple - unintended mouse movement when the hand is lifted.

Is there a one-handed (L), two-key (one a Modifier) keystroke for the Sleep function?

An online search shows Option-Command-Media Eject key, but not all keyboards have that Eject key, it is a two-handed operation, and Option-Command-Power Button is not feasible.
 
Last edited:
Joined
Jan 1, 2009
Messages
16,373
Reaction score
4,725
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 16 Pro, plus ATVs, AWatch, MacMinis (multiple)
I don't know of one, but why not just let it time out and go to sleep? You can set it in the Settings>Power section for how long to be idle (not used) before the sleep starts.

As an aside, I don't sleep my MBP, I want it to stay awake and connected, so I just let the screen go dark, but don't let the CPU sleep. Just select "Prevent automatic sleeping..." in the same section.
 
OP
hughvane
Joined
May 18, 2008
Messages
3,667
Reaction score
103
Points
63
Location
Amberley, Canterbury, New Zealand
Your Mac's Specs
MacMini 14.3, 8.1 & 4.1, OS 14.7 10.14, & 10.11 & 10.6; Macbook Pro 8.2, OS 10.12.
I don't know of one, but why not just let it time out and go to sleep?

In my dotage, the "go-to-sleep" part applies to me as well. I am always awake in the overnight hours, there is force of habit at play, and when it's time to return to bed and sleep I need darkness asap. The screen light interferes with that. That is why I need to put the Mac to sleep.

The three-key method works IF I'm using the Apple keyboard, but I'd prefer two keys only, as mentioned earlier. If a substitute keyboard, no Eject key.

During daylight hours I have the screen (Lock Screen) set to 20 minutes before the screen display darkens, then a further 10 minutes before Saver begins - one does not need the other.
As an aside, I don't sleep my MBP, I want it to stay awake and connected

Maybe of interest, but the Mini/Sonoma going to sleep does not seem to interfere with any incoming, eg. email. I regularly find something awaiting my attention when I return to the computer later, maybe it arrived before the Mac went into stasis after 1 hour.
 
Joined
Jan 1, 2009
Messages
16,373
Reaction score
4,725
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 16 Pro, plus ATVs, AWatch, MacMinis (multiple)
Well, there is a two-click way of doing what you want. Click on the Apple Logo upper left corner, then click "Sleep" and it's asleep immediately. You did mention that if you moved the mouse it woke up again, so maybe that's what you are using now.

On the Lock Screen setting in Settings is "Turn display off when inactive" and an option to set the time to delay. You could set that for, say, 5 minutes and then the screen would go dark after that time. Is that quick enough? It can be set to as litle as 1 minute, but to me, that would then have the screen going dark as I read a web page, for example, so 5 minutes would be a good compromise.
 
Joined
Dec 30, 2022
Messages
928
Reaction score
535
Points
93
Location
Somerset, England
Your Mac's Specs
Mac Mini M1 (8gb Memory / 500 gb Hard drive) Running Sequoia 15.X.X
In setting you can set up a keyboard shortcut, I had the same issue and use alt/cmd/Z, works every time and no more instant wakes

1706863595074.png
 

Rod


Joined
Jun 12, 2011
Messages
10,413
Reaction score
2,477
Points
113
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2021 M1 MacBook Pro 14" macOS 14.5 Mid 2010MacBook 13" iPhone 13 Pro max, iPad 6, Apple Watch SE.
I have "Hot Corners" set to sleep, bottom left corner, a place I never usually go.
I can explain if you're interested. ;)
 
Joined
May 21, 2012
Messages
11,286
Reaction score
1,576
Points
113
Location
Southern New England
Your Mac's Specs
2024 M4 14" MBP, iPhone 16 Pro Max, Watch S7 & Watch S9, AirPods Pro 1
I also use Hot Corners, one is Put Display to Sleep.
 

Rod


Joined
Jun 12, 2011
Messages
10,413
Reaction score
2,477
Points
113
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2021 M1 MacBook Pro 14" macOS 14.5 Mid 2010MacBook 13" iPhone 13 Pro max, iPad 6, Apple Watch SE.
I've been using hot corners for years, it's one of the reasons I don't use Stage Manager.

Screenshot 2024-02-03 at 07.57.35.png

I changed the bottom left corner to screen saver today but sleep used to be there.
 

IWT


Joined
Jan 23, 2009
Messages
10,697
Reaction score
2,598
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
M2 Max Studio Extra, 32GB memory, 4TB, Sequoia 15.4.1 Apple 5K Retina Studio Monitor
Likewise, a fan of Hot Corners.

This tells you how to set up Hot Corners. At the top of the article, you can change the Operating System (OS) from High Sierra all the way to Sonoma to suit your needs.


Ian
 

Rod


Joined
Jun 12, 2011
Messages
10,413
Reaction score
2,477
Points
113
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2021 M1 MacBook Pro 14" macOS 14.5 Mid 2010MacBook 13" iPhone 13 Pro max, iPad 6, Apple Watch SE.
Yes, they are all different but the principal is the same. With Mission Control (in my top right corner) I can view all open windows and desktops, open a new desktop, move an open window to a new/different desktop or bring an open window to the front of the desktop I'm viewing.
I have used this method on my Macs for over 6 years and have always thought Mission Control to be one of the most overlooked, underrated yet useful features of macOS.
NB. Combining it with Hot Corners makes it much more effective than having it on the Dock.

Screenshot 2024-02-03 at 10.37.55.png

The above is what I see when I put my cursor in the top right corner. Cool huh?
 
Last edited:
OP
hughvane
Joined
May 18, 2008
Messages
3,667
Reaction score
103
Points
63
Location
Amberley, Canterbury, New Zealand
Your Mac's Specs
MacMini 14.3, 8.1 & 4.1, OS 14.7 10.14, & 10.11 & 10.6; Macbook Pro 8.2, OS 10.12.
In setting you can set up a keyboard shortcut, I had the same issue and use alt/cmd/Z, works every time and no more instant wakes

View attachment 39206
You bewdy! That’s a nice compact one-handed key cluster, too. From it I note you're using an Alt ernative (😉 sorry) keyboard. I have ~3 of them. Sometimes, in a fit of pique, I put the Apple one aside to use a ready-connected Win one. It doesn’t have an Eject key, but you have overcome that trifling hurdle.
Update - I am using Sonoma 14.3 and a Mini desktop machine, and unfortunately under Displays there are no App Shortcuts as your image shows; nor under anything else to do with the screen display.

I already have one hot corner activated, but it does not darken the screen altogether, just puts the desktop image (Sonoma Horizon if anyone's interested) and a digital time display. I’m guessing I can change that too - right - but the image gets darkened after 20 mins anyway.

In my original post I stated how removing my hand from the mouse, even though the movement was minimal, could cause reactivation of the desktop. That is why I have not sought to use hot corner Sleep as Ian, Ferrar & Rod recommend/suggest. It’s probably time I gave it a try.

Thank you to all contributors ... Hugh
 
Last edited:
Joined
Dec 30, 2022
Messages
928
Reaction score
535
Points
93
Location
Somerset, England
Your Mac's Specs
Mac Mini M1 (8gb Memory / 500 gb Hard drive) Running Sequoia 15.X.X
Update - I am using Sonoma 14.3 and a Mini desktop machine, and unfortunately under Displays there are no App Shortcuts as your image shows; nor under anything else to do with the screen display.
You add it yourself, click the + bottom left of the screen and you can add as many as you like.
 
OP
hughvane
Joined
May 18, 2008
Messages
3,667
Reaction score
103
Points
63
Location
Amberley, Canterbury, New Zealand
Your Mac's Specs
MacMini 14.3, 8.1 & 4.1, OS 14.7 10.14, & 10.11 & 10.6; Macbook Pro 8.2, OS 10.12.
Update: I have preferred using the three-key function to put the Mini18 or the Mini23 to sleep or power it off, but ...
The keyboard that was given to me after I'd bought the Mini18 was reaching its end-stage so I bought a 2021 Magic Keyboard. Now I need to learn how to do without the Eject key.

I have investigated Apple's own page of instructions, but it seems to focus largely on the Touch ID type produced after the one I bought.

On a 2021 Magic Keyboard what are the keystrokes for :
a) sleep?
b) shut down?
I prefer keystrokes, and I already use one hot corner for screen saver.

TIA ... Hugh
 
Joined
Dec 30, 2022
Messages
928
Reaction score
535
Points
93
Location
Somerset, England
Your Mac's Specs
Mac Mini M1 (8gb Memory / 500 gb Hard drive) Running Sequoia 15.X.X
I made my own as per #5 and it works on the Magic Keyboard, having just bought a secondhand A1314.
 

Rod


Joined
Jun 12, 2011
Messages
10,413
Reaction score
2,477
Points
113
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2021 M1 MacBook Pro 14" macOS 14.5 Mid 2010MacBook 13" iPhone 13 Pro max, iPad 6, Apple Watch SE.
Correct me if I'm wrong but I thought the "Magic" keyboard was primarily for iPad and or iPhone, hence no eject button. I have an Apple Wireless keyboard which I use with a MBP when it's on a stand. It is also called a "Magic" keyboard but it's a much earlier model.

IMG_4478.jpeg

As you can see, it does have an eject button and follows all the same keystroke commands as listed here.
 

IWT


Joined
Jan 23, 2009
Messages
10,697
Reaction score
2,598
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
M2 Max Studio Extra, 32GB memory, 4TB, Sequoia 15.4.1 Apple 5K Retina Studio Monitor
In addition to Rod's extensive Post; I'll expand on what Jim B (@Jimmysb) posted #5.

Open System Settings. At the top Search window, type in Keyboard.

S11.jpg

Then Choose Keyboard shortcuts, as above.

Now Click on Keyboard Shortcuts (on the bottom right small window)). You will see this.

S22.jpg

Now Click on Modifier Keys (at the bottom of the List) and you will see this:

S33.jpg

From these windows, you get a whole range of Keyboard options. Any help?

Ian
 
OP
hughvane
Joined
May 18, 2008
Messages
3,667
Reaction score
103
Points
63
Location
Amberley, Canterbury, New Zealand
Your Mac's Specs
MacMini 14.3, 8.1 & 4.1, OS 14.7 10.14, & 10.11 & 10.6; Macbook Pro 8.2, OS 10.12.
Continued thanks for all contributions, but the great frustration is that despite Ian's excellent expose, what he suggests (in text) is simply u/a to me. For examples - why would the Command key have as alternative options what is made available in the popup/drop-down menu anyway; and why would one add option when it's already available?

I can get to those Modifier keys as instructed, but then if - for example - I click on Command popup, the options presented are no help [image].

To Rod - that is the keyboard that has been replaced, but is rather-too-rapidly looking like returning to the #1 choice. At least I know which keys work to put the Mini to Sleep or to Shut Down.

The Magic Keyboard I bought is - as mentioned - the 2021 version, and has no Eject button. Its place has been taken by a padlock symbol which is proving to be something of a nuisance if one is a little hasty in hitting delete.

Back to the drawing board!
 

Attachments

  • KS.jpg
    KS.jpg
    33.5 KB · Views: 1

Rod


Joined
Jun 12, 2011
Messages
10,413
Reaction score
2,477
Points
113
Location
Melbourne, Australia and Ubud, Bali, Indonesia
Your Mac's Specs
2021 M1 MacBook Pro 14" macOS 14.5 Mid 2010MacBook 13" iPhone 13 Pro max, iPad 6, Apple Watch SE.
I just had a look on the Apple online store and the current Magic keyboard is the same as yours, top right key has a padlock symbol on it. The model for the MacBook's has a touch ID button instead. Looks like the days of ejecting are gone which figures I suppose given internal Disk drives are pretty much a thing of the past.
 
OP
hughvane
Joined
May 18, 2008
Messages
3,667
Reaction score
103
Points
63
Location
Amberley, Canterbury, New Zealand
Your Mac's Specs
MacMini 14.3, 8.1 & 4.1, OS 14.7 10.14, & 10.11 & 10.6; Macbook Pro 8.2, OS 10.12.
At its most basic, all I (others?) seek is an alternative key on the 2021 (& later?) keyboard to what was the Eject key.

I recommend reading Wiki to see what keyboard version was released, and when.
A2450 Magic Keyboard with Lock Key: 78 keys
May 2021 (MK2A3LL/A $99 EMC 3619); Silver

Looks like that is what I bought, costing me NZ$149, tho Apple tried hard to sell me the more expensive version @ NZ$219. I don't need - or want - TouchID. For the record, not as 'nice' to use as the previous sloping keyboard.
 
OP
hughvane
Joined
May 18, 2008
Messages
3,667
Reaction score
103
Points
63
Location
Amberley, Canterbury, New Zealand
Your Mac's Specs
MacMini 14.3, 8.1 & 4.1, OS 14.7 10.14, & 10.11 & 10.6; Macbook Pro 8.2, OS 10.12.
Okay, time to look along a different route, and I have searched online for an answer ...

How might I disable the padlock key on the 2021 Magic keyboard?

It is way-too-easy to hit/press it instead of Delete, it is of no practical use (to me), I'm the only user and - frankly - I cannot understand why Apple put the key there in the first place.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top