1. Home
  2. Boost Productivity with Essential Windows Tips & Tricks
  3. Toggle the taskbar keyboard shortcut windows 10

How to toggle the Taskbar with a keyboard shortcut on Windows 10

Windows 10 has a setting that lets you hide the taskbar when it isn’t being used. When this setting is enabled, the taskbar remains hidden until you move your mouse cursor over the area where it normally is. It appears after a slight delay making sure that it doesn’t ‘accidentally’ reappear when you don’t need it to. For most users, this one setting is enough however, if you need more control over when the taskbar appears/disappears, you can use an AutoHotKey script to toggle the taskbar with a keyboard shortcut.


Since we’re using an AHK script, you need to have the AutoHotKey app installed on your system. It’s free to download and it takes very little time and effort to install it.

Toggle taskbar script

Open a new Notepad file and paste the following in it. Save it with a name that tells you what the script is for, and save it with the AHK extension.

This script lets you toggle the taskbar with the Spacebar + t keyboard shortcut.

VarSetCapacity(APPBARDATA, A_PtrSize=4 ? 36:48)

Space & t::
NumPut(DllCall("Shell32\SHAppBarMessage", "UInt", 4 ; ABM_GETSTATE
, "Int")
? 2:1, APPBARDATA, A_PtrSize=4 ? 32:40) ; 2 - ABS_ALWAYSONTOP, 1 - ABS_AUTOHIDE
, DllCall("Shell32\SHAppBarMessage", "UInt", 10 ; ABM_SETSTATE
KeyWait, % A_ThisHotkey

If you want, you can change the keyboard shortcut that is used to toggle the taskbar. You will have to edit the script to do so. Specifically, this is the line that you need to edit;

Space & t::

Everything before the two colon signs is the keyboard shortcut used to run the script. In some cases, you might need to read up on how to set a keyboard shortcut. With the space bar, you need only enter Space however, for the Ctrl modifier key, you have to use the ^ symbol. There’s extensive documentation available so this won’t be much of a problem.

The script, and AutoHotKey must be running at all times in order for you to be able to toggle the taskbar whenever you want. It is up to you to make sure that the keyboard shortcut you set for the script doesn’t clash with other apps. The Space + T keyboard shortcut is a safe one but you can edit it if it doesn’t suit you.

If you’re using this script, we strongly recommend you set the taskbar to ‘always show’ from the Settings app. Open the Settings app and go to the Personalization group of settings. There’s a dedicated Taskbar tab there where you can set the taskbar to always remain visible.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.