There are a lot of ways to create shortcuts for system tasks in Windows, but what could be faster than doing it with the hotkey of your choice? Here’s how two tools can put nearly any system task at your fingertips.
We’ve talked about how to turn any action into a keyboard shortcut before, and the tool we use to get it done — AutoHotkey — is useful for oh-so-many things. However, when it comes to certain system tasks, it becomes a bit more difficult.
- Open or close your CD drive
- Start your screensaver, sleep your display, or sleep your computer
- Shut down, restart, or log off
- Change the volume by whatever intervals you want
- Speak the current clipboard text out loud
- Change the transparency of a window
- Bring a certain window to the front
- Kill all instances of any program
- Over 70 other tasks
To see all that you can do with NirCmd, just check out its homepage. NirCmd is really just a command line program — something you’d run by typing commands into a terminal. So, getting it working with AutoHotkey is easy. For example, let’s say you wanted to set a hotkey for putting your monitor to sleep. The NirCmd command for this is:
"C:\Program Files\Nircmd\nircmd.exe" monitor off
(This assumes you put
C:\Program Files\Nircmd — obviously, adjust that command to wherever you put the program). If you want to map this to the Print Screen key on your keyboard — a key I never use — you can just add this line to an AutoHotkey script (if you aren’t familiar with AutoHotkey, check out our primer on how to set it up):
PrintScreen:: Run "C:\Program Files\Nircmd\nircmd.exe" monitor off
All you need to do is add the key you want to use, two colons, the
Run text and the NirCmd command. It’s that simple. I have a whole block of these in my AutoHotkey script set to run at startup, so all of my most used system actions are only a keystroke or two away — it seriously cuts down on the amount of clicking I have to do during the day.
We’ve already talked about both of these programs before, but it was such a great use for each of them that we felt it was worth sharing. If you try this out for yourself (or if you already do this), let us know what cool key combinations you come up with in the comments!
Photo by Neil T.