microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.45k stars 6.45k forks source link

[Keyboard Manager] allow running UWP apps with keyboard shortcuts #31735

Open takase1121 opened 6 months ago

takase1121 commented 6 months ago

Description of the new feature / enhancement

  1. The user is able to select a UWP app to launch when a keyboard shortcut is pressed.
  2. The user is able to select a shortcut (.lnk) file to launch when a keyboard shortcut is pressed.

Scenario when this would be used?

I am trying to launch Windows Terminal when windows+return is pressed. This workflow is often used in Linux.

Supporting information

I tried a few workarounds that doesn't work:

  1. Creating a shortcut on the Desktop and selecting the shortcut (causes "Catastrophic failure")1
  2. Selecting wt.exe directly (doesn't launch)
  3. Selecting explorer.exe with the argument shell:AppsFolder\(AppID) (causes a crash)2

My current workaround is to call cmd.exe with this exact argument: /s /c "start shell:AppsFolder\(AppID)" where (AppID) is the result of Get-StartApps Terminal. This solution is suboptimal since it briefly shows the cmd window before closing and laucnhing Windows Terminal itself.

System Info

PowerToys: 0.79.0 Windows: Windows 11 Enterprise 22H2 22621.3235

ffes commented 6 months ago

I couldn't get the workaround describe above to start Terminal to work for me on Win10 Pro, so I just start C:\Windows\System32\cmd.exe. Often not the shell I want, but at least it opens Terminal for me when I press Win+T.

It can be hard to find apps. In general it should be easier to find installed applications. This problem is not limited to UWP-apps installed through the store.