Control Volume Slider in Windows with Keyboard

Control Volume Slider in Windows with Keyboard
Like Tweet Pin it Share Share Email

Want to know what grinds my gears? Ever wonder why something you’d think be so easy to configure is actually not? Yes, I’m talking about you, Mr. volume slider in Windows! Don’t try and look away. I’m sure a lot of us wondered on how to go about with controlling the volume slider in Windows with our keyboard. Oh that’s easy you might say! Just buy a media keyboard that already have the volume up/down keys! Yes, that would definitely solve the issue but what about people who don’t wish to buy a new keyboard just for this feature or for those who wish to use their current keyboard because they like it best? Are we out of luck? Turns out that we are not. This seemingly simple feature actually helps me out a lot as I use it pretty much during every computer session. If you’ve ever used a media keyboard at home where the volume control was just a push of a button away, you’ll understand my point, especially if you’re now stuck with using a plain jane keyboard at work.

Why So Hard?

Here is the keyboard that I am using at work:

Current Keyboard
Current Keyboard

While it does have volume control, I actually have to press and hold the FN (function) key first. Other multimedia keyboards like Logitech have dedicated volume control buttons. So as you can see, although I can control the volume on my keyboard, it wasn’t the most ideal. I then found out that I can actually toggle the Function key on that specific keyboard so that controlling the volume didn’t require me to hold the Function each and every time as well. This was awesome but what if I wanted to map another key for that dedicated feature?

Here is the keyboard I’m using at home:

Regular Keyboard
Regular Keyboard

As you can see, this is a very basic, no frills keyboard with no multimedia keys whatsoever. My ideal setup is to be able to assign two keys of my choosing and map them to the volume up and volume down function in Windows. At first I wanted to see if this was possible to configure in Windows itself but I came to the conclusion that you can’t. Such a shame because this is a much needed feature. Many people I’m sure need to be able to easily control sound volume output various times a day while working at their computer. If you have external speakers, then yes, you obviously could just control the volume knob from there but again, this is a hassle to perform multiple times a day. We could control the volume with the volume slider in the system tray but come on, that gets old very quickly.

AutoHotkey to the Rescue

AutoHokey is a small utility that allows you to configure all sorts of functions and macros that you’d then map to a key on your keyboard of your preference. Sounds perfect right? Indeed it is. You can do so much with this utility that assigning two keys for the volume control as I am showing you here is literally like a drop of water in an ocean. Macros are very useful for making your daily computing that much more easier and not to mention faster. Think of it as “automation”. You write a script to perform various actions, bind it to a key of your choosing and once activated, those actions will be performed automatically for you. While it’s true that gamers and programmers benefit the most from keyboard macros, regular users can also use it to perform mundane tasks that needs to be performed at regular intervals throughout the day. I guarantee that once you learn how to use AutoHotkey, you’ll never want to use another computer without it.

You can download AutoHotkey from here.

The utility is extremely small and installation is a breeze. Installation is your usual Next, Next finish type. Upon first run of the utility, you will be asked if you want the utility to help you create your first script file and to drop it in your Documents folder. Hit Yes to continue.

AHK First Run
AHK First Run

The script file will then be loaded on screen. How AutoHotkey works is that once the utility is launched, it will load this script file into memory and all of the key bindings that you specify will be activated. It’s pretty simple. But of course, getting the script to work to your liking is the hard part. If you read the sample script file, it will tell you that it has already configured two keyboard bindings for you as a test. At this point, reload AutoHotkey again and press your Windows key + Z. Your default browser should then launch and go to the AutoHotkey website.

Our volume up/down key script is extremely simple. I chose to use my Page Up and Page Down key to map to the volume up and volume down function, respectively. These are two keyboard keys that I rarely use and they made the most sense as far as the keys went for this function. I initially used the numpad “-” and “+” key but didn’t like it after a while. Once you find the two keys that you want to map, it is now time to figure out how to write out the script and this is where it can get a little challenging. Luckily, the guide below presents us with everything we need:


Open up your script file by right-clicking the AutoHotkey system tray icon and selecting “Edit This Script”.

Edit Script
Edit Script

At the end of the file, I would type this two scripts to bind my two keys:


You’ll obviously want to substitute your own two keys if you don’t want to use the Page Up and Page Down keys like me.

Once that is done, I’ll need to reload the script by right-clicking on the icon again and choosing the appropriate option. And just like that, I can now control my volume up/down function with the two keys of my choosing! It’s that simple. All this without needing to purchase a media keyboard. As you can tell from that list, you can map a whole bunch of other media functions such as pausing and stopping your media as well, which also can be very handy. I do noticed that AutoHotkey does not launch automatically with Windows so you’ll need to manually place the AutoHotkey program shortcut in your Startup folder:

For Windows 7 users: http://windows.microsoft.com/en-us/windows/run-program-automatically-windows-starts#1TC=windows-7

For windows 8 users: http://support.microsoft.com/kb/2806079

If you haven’t noticed by now, you can actually turn that boring keyboard you’re using right now into your own media keyboard with just AutoHotkey. Most of us rarely use the F1-F12 keys as well as keys like Home and End. You can essentially use AutoHotkey to make these keys do all your bidding!

In the End…

I hope this article helps you out because I simply cannot function without these two simple functions on my keyboard as I listen to music every time I’m on my computer. Now that I can control the volume on my keyboard, I now am able to leave my external speaker’s volume knob in the same location and control the volume via my Page Up and Page Down key. No more turning the volume knob or using my mouse to control the volume slider within Windows. You’ll most definitely want to check out their forum section if you want to learn to do much more with AutoHotkey than just these simple media function bindings as discussed here.

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

63 + = 72