2

My keyboard does not have a "Sleep" Key to put my PC to sleep, so I created a Windows Shorcut to put my PC to sleep.

Now I want to map a single specific Key to that Shortcut, but all Windows Shortcuts start with "Ctr + Alt", which makes any Windows Shorcut require a minimum of 3 Key presses.

So I would like to map a specific single Key to my "Sleep" Shorcut so that I can put my PC to sleep by simply pressing that single Key. I have never in my life used the "Pause/Break" Key on my keyboard, so that would be a perfect candidate.

How can I remap the "Pause/Break" Key to the "Sleep" Shorcut I created?

(Alternatively, is there another way to put my PC to sleep using a single Key on a keyboard that does not have a "Sleep" Key?)

5

This is easily accomplished with AutoHotKey.

AutoHotkey is a free, open-source macro-creation and automation software utility that allows users to automate repetitive tasks in Microsoft Windows. Any application user interface can be modified by AutoHotkey (for example, overriding the default Windows control key commands with their Emacs equivalents). It is driven by a custom scripting language that is aimed specifically at providing keyboard shortcuts or hotkeys.

The script would be:

pause::run "full path of your shortcut"

Obviously, put the path to your shortcut in the quotes.

There are other methods to sleep, shutdown, hibernate, or restart your PC. You can find the commands here. Read through the comments though on the selected answer, there are some caveats that can be worked around.

Personally, I love AutoHotKey. I remap the media keys on my keyboard (I never use them for media) to do things like open a command prompt, start a remote desktop session, open Notepad++, start the snipping tool, etc.

| improve this answer | |
0

There are 3rd party software such as: http://www.klm32.com/KbdEdit.html that will allow you to map a key as you see fit.

I'm curious though...is the PC not close enough to you to simply press the power button on the PC itself? Almost ALL of them allow you to specify in the BIOS/UEFI what pressing the power button does, allowing it to be set to put the computer to Sleep.

If the above doesn't help, check this similar situation and solutions: Are there Windows 7 keyboard shortcuts for Log Off and Standby?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.