The last line in the script defines the keyboard shortcut and has it call the function. SwitchToWindowsTerminal () Hotkey to use Ctrl + Shift + C to launch / restore the Windows Terminal. In a new or existing AutoHotkey script, you can define this function and hotkey: I’ve blogged about AutoHotkey in the past, and if you’ve never used it you really should check it out. 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. Method 4: Switch to Windows Terminal via keyboard shortcut and AutoHotkey 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. 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. 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. Method 3: Launch Windows Terminal via a custom keyboard shortcut 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. This is in fact what I show how to do from AutoHotkey further below. 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. 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. Luckily, I found this wonderful post describing how to launch Microsoft Store apps from the command line.įrom there, I was able to track down that you can launch the Windows Terminal store app using:Įxplorer.exe shell:AppsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App This can make launching it via other applications or scripts tough. 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. Method 2: Launch Windows Terminal from the command line So let’s continue exploring other options.
0 Comments
Leave a Reply. |