6 minute read

I decided to try out the new Windows Terminal to see how it compared to ConEmu, which is my usual console. The recommended way to get the Windows Terminal is to download it from the Microsoft Store so that it can automatically update itself as new versions are released.

While the Windows Terminal is not as mature and feature rich as ConEmu, I did enjoy it, and it’s being actively worked on with plenty of features coming down the road. I’d also recommend following Scott Hanselman’s post about how to make it look nicer.

One feature I missed right away was ConEmu allows you to set a keyboard shortcut to put it in focus. As a software developer, I’m constantly in and out of the terminal, and being able to get to it in a keystroke is very convenient.

Method 1: Pin Windows Terminal to the taskbar

The easiest way to get to the Windows Terminal using a keyboard shortcut is to pin it to the taskbar. Not only does it make it easy to click on with the mouse, but you can also use the Windows Key + [number] keyboard shortcut to launch it or put it in focus.

For example, if on your taskbar from left to right you have: Edge, Chrome, Windows Terminal, then you could use Windows Key + 3 to launch the Windows Terminal, or put it in focus if it’s already open. Similarly, Windows Key + 1 would launch Edge, and Windows Key + 2 would launch Chrome.

This is a simple solution and it works, but the reason I’m not a fan of it is:

  1. If I reorder the windows on the taskbar then the keyboard shortcut changes.
  2. This method only works for the first 10 items on the taskbar. i.e. you can’t do Windows Key + 11.
  3. I find it awkward to use the Windows Key with any numbers greater than 4.

So let’s continue exploring other options.

Method 2: Launch Windows Terminal from the command line

The Windows Terminal is installed as a Microsoft Store app, so the location of the executable isn’t very obvious, and it is likely to change every time the app is updated. This can make launching it via other applications or scripts tough. Luckily, I found this wonderful post describing how to launch Microsoft Store apps from the command line.

From there, I was able to track down that you can launch the Windows Terminal store app using:

explorer.exe shell:AppsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App

Update: It turns out you can also simply run wt from the command line to launch the Windows Terminal, as wt.exe gets added to the Windows PATH when the Windows Terminal is installed.

Now that we know how to launch it from the command line, you can use this from any custom scripts or application launchers you might use. This is in fact what I show how to do from AutoHotkey further below.

While this command allows us to launch Windows Terminal, it doesn’t allow us to put it in focus if it’s already open, so let’s continue.

Method 3: Launch Windows Terminal via a custom keyboard shortcut

The above post mentions that you can simply navigate to shell:AppsFolder, find the Windows Terminal app, right-click on it, and choose Create shortcut. This will put a shortcut to the application on your desktop, and like any shortcut file in Windows, you can right-click on it, go to Properties, and assign it a Shortcut key that can be used to launch the application.

While this will allow you to launch the Windows Terminal with a custom keyboard shortcut, like the previous method, it opens a new instance of the Windows Terminal every time, which isn’t what I want, so let’s continue.

Method 4: Switch to Windows Terminal via keyboard shortcut and AutoHotkey

To use a custom keyboard shortcut to both launch the Windows Terminal, as well as simply switch to the Windows Terminal window if it’s already open, I use AutoHotkey. I’ve blogged about AutoHotkey in the past, and if you’ve never used it you really should check it out.

In a new or existing AutoHotkey script, you can define this function and hotkey:

  windowHandleId := WinExist("ahk_exe WindowsTerminal.exe")
  windowExistsAlready := windowHandleId > 0

  ; If the Windows Terminal is already open, determine if we should put it in focus or minimize it.
  if (windowExistsAlready = true)
    activeWindowHandleId := WinExist("A")
    windowIsAlreadyActive := activeWindowHandleId == windowHandleId

    if (windowIsAlreadyActive)
      ; Minimize the window.
      WinMinimize, "ahk_id %windowHandleId%"
      ; Put the window in focus.
      WinActivate, "ahk_id %windowHandleId%"
      WinShow, "ahk_id %windowHandleId%"
  ; Else it's not already open, so launch it.
    Run, wt

; Hotkey to use Ctrl+Shift+C to launch/restore the Windows Terminal.

The last line in the script defines the keyboard shortcut and has it call the function.

Here I’m using Ctrl + Shift + C (^+c) for my keyboard shortcut, but you could use something else like Windows Key + C (#c) or Ctrl + Alt + C (^!c). Check out the AutoHotkey key list for other non-obvious key symbols.

You may have also noticed in the code that if the window is already in focus, we minimize it. This allows me to easily switch to and away from the Windows Terminal using the same shortcut keys. Using Alt + Tab would also work to switch back to your previous application.

Finally, the line that actually launches the Windows Terminal is:

Run, wt

If you want the Windows Terminal launched as an elevated command prompt (i.e. as Admin), then you need to add *RunAs, like this:

Run, *RunAs wt

Also, if you haven’t already, you’ll want to follow these steps to digitally sign your AutoHotkey executable to allow AutoHotkey scripts to be able to interact with applications running as Admin. Without this, the AutoHotkey script will not be able to minimize the Windows Terminal.

Getting the AutoHotkey script running

If you’ve never used AutoHotkey before and want to get this working, all you need to do is:

  1. Install AutoHotkey
  2. Create a new text file with a .ahk extension
  3. Copy-paste the above script into the file
  4. Double click the file to run it.

Once that’s done, you should be able to use your keyboard shortcut to switch to Windows Terminal.

You’ll also likely want to have your script startup automatically with Windows so that you don’t have to manually run it all the time. This is as easy as dropping the .ahk file (or a shortcut to it) in your shell:Startup directory. Windows will automatically run all files in this directory every time you log in.

For more detailed instructions and information, see this post


As a software developer, I’m constantly in and out of the terminal for running Git and PowerShell commands. If you’re ok simply pinning Windows Terminal to the taskbar in a dedicated position and don’t mind the preset keyboard shortcut, then roll with that. For myself, using AutoHotkey I can now use Ctrl + Shift + C to switch to and away from the Windows Terminal at anytime, no matter what other application currently has focus, and not having to reach for the mouse.

Shameless Plug: You can also checkout my open source project AHK Command Picker that allows you to use a GUI picker instead of having to remember a ton of keyboard shortcuts.

I hope you’ve found this information helpful.

Happy command lining :)



Thank you so much for this post!

I really liked the look of Windows Terminal but couldn’t switch from ConEmu because I depend too much on the ability to focus on it with a keyboard shortcut (essential for a tool which uses a keyboard to control it).

I was about ready to give up and then found this post. I’m looking forward to getting to know Windows Terminal a little better now.

I was going to use the win+n approach, but I thought this is a good chance to try and get AHK baked into my workflow.


Thank you so much for what you do :)

I found this article and this vlog very useful, I hope you are doing well

Have a nice day :)


Seems like after an update wt cannot be executed with this script anymore. Trying to find a solution, even from simple cmd wt command is not working.


The terminal seems to launch from the location the script is located in. How to fix this? I’d rather have it start in %USERPROFILE%.

Marc Brien

Excellent, I did not know about Windows +Num starting the toolbar items. I also love Windows Terminal - Here is a link to using the configuring windows terminal


Leave a Comment

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