Terminal: Shortcut key to launch Terminal

Created on 30 Sep 2019  路  22Comments  路  Source: microsoft/terminal

It would be great if shortcut key's would work to launch Windows Terminal. I have created a shortcut from the shell:AppsFolder folder, and added a shortcut key. Unfortunately after a restart the shortcut keys stop working.

Issue-Feature Needs-Attention Needs-Tag-Fix Needs-Triage

Most helpful comment

Could you be more specific on how you're setting the "shortcut key" for the Terminal? This sounds like a Windows Shell feature that I'm totally familiar with.

For the record, you can always use Win+[num] to launch the N'th shortcut on your taskbar. For example, on my taskbar:
image

Win+1 launches explorer, Win+2 is Teams, etc.

All 22 comments

Could you be more specific on how you're setting the "shortcut key" for the Terminal? This sounds like a Windows Shell feature that I'm totally familiar with.

For the record, you can always use Win+[num] to launch the N'th shortcut on your taskbar. For example, on my taskbar:
image

Win+1 launches explorer, Win+2 is Teams, etc.

I'm not sure if this is helpful, but this shortcut to the terminal persists through reboots, etc.

I do a standard Windows shortcut, which uses ctrl+alt, to create one with Windows Terminal. I install through Chocolatey so I found the .exe, which is in
"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.5.2681.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe"
and created a shortcut to the desktop. And on that shortcut, right-click and set the shortcut key to s, which sets it to ctrl+alt+s.

@profse Under C:\Program Files\WindowsApps\ I am unable to access the folder:

image

And I am unable to give myself read permissions:

image

@zadjii-msft That works fine, thanks for the tip.

I did find a work around. I can set a shortcut key to launch the app from C:\Users\user\AppData\Local\Microsoft\WindowsApps\wt.exe. WinHotKey can make a shortcut to a VB script (to run cmd in background while the app launches) to launch a bat file to call Windows Terminal.

VB Script

Set WshShell = CreateObject("WScript.Shell" ) 
WshShell.Run chr(34) & "win_terminal.bat" & Chr(34), 0 
Set WshShell = Nothing 

Bat file

@ECHO OFF
start /B C:\Users\user\AppData\Local\Microsoft\WindowsApps\wt.exe

That's the long way round but at least I can have any shortcut key I like.

Desktop shortcut icons can be built like this
image
Locate windows terminal, from the start menu, then drag the terminal icon from the start screen to the desktop.

The disadvantage is that a new window opens every time, and the speed is a little slow.

@profse's recommendation of using a "standard windows shortcut key" works on a shortcut manually created to point at the wt.exe path @phillip-white-jarden mentioned. In the screenshot below, you'll see wt.exe as the target and that I've selected "t" as my "shortcut key" ...

wt-shortcut

It would be nice to be able to add that keybinding directly to the shortcut automatically added to the start menu when windows terminal is installed. I don't understand enough about Windows to know why that Windows Terminal start menu shortcut doesn't allow the usual right-click, _more_ > _open file location_, which means I can't find where the start menu shortcut lives. I checked the 2 spots I know about ...

  • %USERPROFILE%\AppData\Roaming\Microsoft\WindowsStart Menu\Programs
  • C:\ProgramData\Microsoft\WindowsStart Menu\Programs

If it isn't in either of the locations below, where is it?

Create a desktop shortcut by dragging the icon from the Start Menu. Once on the desktop, right-click the icon and you will see the windows Terminal properties. You can change the Shortcut Key in there and the actual icon. You can grab the icon from Github. https://github.com/microsoft/terminal/blob/master/res/terminal.ico

Is there a way to create something similar to ctrl+~ on conemu. I think for any multi-tabbed terminal that would be of great use since the existence of multiple tabs is to avoid having multiple windows.

Here is the easy way, i hope you'll find it usefull

Add C:Users_YOUR_WINDOWS_USERNAME_\AppData\Local\Microsoft\WindowsApps\Microsoft.WindowsTerminal_8wekyb3d8bbwe to PATH (environnement variable)

image

now, WIN+R and type wt

it will start the Terminal directly ^^

image

I've tried to customise the shortcut icon used for Windows Terminal but am having trouble, it seems to always fallback to the executable icon for this Windows 10 store app. I like to use a white theme for my taskbar icons.

Any ideas?

image

What a poster above calls 'the easy way' is not easy. Nor on my system can I find any way of setting a keyboard shortcut for Windows Terminal via File Explorer.

The whole point of the new Windows Terminal is to make Windows looks less bad in comparison with some features of Linux. Until the day comes when one can easily . . open a terminal on windows with a keyboard shortcut, that embarrassment will persist - and irk some users. (Also, though this is a separate issue, in my Windows terminal the caret keeps reverting back to the 'legacy' block mode. That too neither looks good nor endears.)

Could you be more specific on how you're setting the "shortcut key" for the Terminal? This sounds like a Windows Shell feature that I'm totally familiar with.

For the record, you can always use Win+[num] to launch the N'th shortcut on your taskbar. For example, on my taskbar:
image

Win+1 launches explorer, Win+2 is Teams, etc.

To me, it works like a charm... 馃槏
Now I will reorganize all of my taskbar. Thanks' a lot.

Just copy the C:Users_YOUR_WINDOWS_USERNAME_\AppData\Local\Microsoft\WindowsApps\Microsoft.WindowsTerminal_8wekyb3d8bbwe folder to a place where you have all the rights, e.g. C:Users{username}\wt.
It's 18.5 MB and you will have no problem creating shortcuts

@rodrigocipriani

Thanks for trying to help.

'Could you be more specific on how you're setting the "shortcut key" for the Terminal?' The problem is I see no way to set a shortcut key.

Using Win+[num] to launch taskbar items I find unsatisfactory. For, the items are not numbered and indeed the first of them is not even separated from the first of the - what? - numbered-in-no-sense items. I mean: in your screenshot, File Explorer is the first numbered icon but, also, merely, the fourth item in a row.

@KwikKwekKwak

Thanks for trying to help.

'Just' copy that obscurely named system folder? That seems the sort of thing that will make Windows break later on.

@LinuxOnTheDesktop

I can't find the comment I've made that you are taking about.
But... After you install cmder.net, you don't need to configure nothing to have this hotkey, you have just press Ctrl + ' after open it.

I think a default hotkey like that would be great.

@rodrigocipriani

Ah: I find that I was not quoting you - as I thought I was - but rather quoting you quoting someone else.

Isn't cmder.net an alternative terminal emulator to the Microsoft terminal? And isn't this the current github about the latter? EDIT: But, oh, I suppose you are saying: one can have a nice terminal on Windows and one that is launchable via shortcut, by using 'cmder.net'.

@rodrigocipriani

Ah: I find that I was not quoting you - as I thought I was - but rather quoting you quoting someone else.

Isn't cmder.net an alternative terminal emulator to the Microsoft terminal? And isn't this the current github about the latter? EDIT: But, oh, I suppose you are saying: one can have a nice terminal on Windows and one that is launchable via shortcut, by using 'cmder.net'.

Not exactly... Cmder.net is a also a terminal. You can try it. I was using this, but now, after testing new Windows Terminal on preview version, I uninstall cmder, because Windows Terminal is veeeery nice.

I talk about cmder just to compare the hotkey it have natively.

Hi all, I have somewhat of a workaround that I am which may interest some people.
It has a dependency on AutoHotkey. I have it set up to start Windows Terminal using Control + Alt + T (like Ubuntu) in the current directory in context. So I can launch it from inside a folder and have the current directory be set correctly.

Just pushed the code into a public space. See Windows Terminal Hotkey in this repo:
https://github.com/mobeigi/AutoHotKey-Scripts

mobeigi:

That looks just the thing. Thank you very much. (Autohotkey: making Windows usable, one hack at a time.)

Note for others: of the two scripts, one (namely 'windows-terminal-hotkey.ahk') is the main one and the other ('Explorer.ahk') is sourced from it (like source/. in shell). And one could compile the thing - using Autohotkey itself - into a single executable.

I will try out the scripts tomorrow.

@LinuxOnTheDesktop If you come up with any improvements, submit a PR please, I'd like to benefit too!

PR

@mobeigi where are the instructions to set it up?

@mobeigi where are the instructions to set it up?

Have a look online at how AutoHotKey works and how to run AutoHotKey scripts on startup. For the most part, you just make sure the script when your computer starts and it should work for you. I've been using it for a while now with no issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DieselMeister picture DieselMeister  路  3Comments

NickITGuy picture NickITGuy  路  3Comments

Wid-Mimosa picture Wid-Mimosa  路  3Comments

mrmlnc picture mrmlnc  路  3Comments

zadjii-msft picture zadjii-msft  路  3Comments