Jump to content

Creating a shortcut to put computer to sleep on a Logitech Keyboard through a macro

I wanted to be able to create a macro shortcut to put my Windows 10 computer to sleep when a function key is pressed on my Logitech Keyboard. I was looking through the Logitech software for the keyboard and there didn't seem to be a shortcut for sleep, so I created a shortcut on my desktop, which works when run. But when I was trying to bind the key on the keyboard to the shortcut it didn't run. Does anyone have a solution?

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, Mooshi said:

Is the tower close enough to set power button to sleep?

Yes but I would still like a way to do it from my keyboard

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, elpiop said:

if you can link the macro key to a batch file, this command should work:

you might have to disable hibernation mode though (https://superuser.com/a/145463)

 


rundll32.exe powrprof.dll,SetSuspendState 0,1,0

 

This is what I was using before, and I also did turn off hibernate so that isn't an issue.

Link to comment
Share on other sites

Link to post
Share on other sites

23 hours ago, Vaibhav Shirole said:

I wanted to be able to create a macro shortcut to put my Windows 10 computer to sleep when a function key is pressed on my Logitech Keyboard. I was looking through the Logitech software for the keyboard and there didn't seem to be a shortcut for sleep, so I created a shortcut on my desktop, which works when run. But when I was trying to bind the key on the keyboard to the shortcut it didn't run. Does anyone have a solution?

If you are using Windows 10 make a macro for Windows key + x then u then s 

Link to comment
Share on other sites

Link to post
Share on other sites

Guest
This topic is now closed to further replies.

×