microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
108.86k stars 6.42k forks source link

Start menu opens when remapping Win+C to URI #33154

Open TheOddCell opened 3 months ago

TheOddCell commented 3 months ago

Microsoft PowerToys version

0.81.1

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

Keyboard Manager

Steps to reproduce

When I used "Remap a shortcut" to map Win+C to the URI https://copilot.microsoft.com/.

✔️ Expected Behavior

When I use Win+C, open https://copilot.microsoft.com/ on my default browser (Chrome)

❌ Actual Behavior

Expected happens, but also start menu opens.

Other Software

Google Chrome 125.0.6422.113 Windows 22H2 build 19045.4412

mrozekma commented 3 months ago

I also see this behavior. I think it's caused by the key release order. In my case my keyboard supports binding hotkeys to a single key, but it seems to press them all at once and then release them in an arbitrary order, causing problems. For example, this press of Ctrl+Shift+Alt+Win+F13 worked fine and launched the app it was bound to:

VK  SC  Type    Up/Dn   Elapsed Key
-------------------------------------------------------------------------------------------------------------
A2  01D     d   4.23    LControl
A0  02A     d   0.00    LShift          
A4  038     d   0.00    LAlt            
5B  15B     d   0.00    LWin            
7C  064     d   0.02    F13             
7C  064     u   0.09    F13
A2  01D     u   0.01    LControl        
A0  02A     u   0.02    LShift          
A4  038     u   0.00    LAlt            
5B  15B     u   0.01    LWin            

The next one where F13 was released last also launched the app, but also randomly Microsoft 365 -- this appears to be what happens if you press/release Ctrl+Alt+Shift+Win for some reason:

VK  SC  Type    Up/Dn   Elapsed Key
-------------------------------------------------------------------------------------------------------------
A2  01D     d   4.00    LControl
A0  02A     d   0.00    LShift          
A4  038     d   0.00    LAlt            
5B  15B     d   0.00    LWin            
7C  064     d   0.02    F13             
A2  01D     u   0.09    LControl
A0  02A     u   0.01    LShift          
A4  038     u   0.02    LAlt            
5B  15B     u   0.02    LWin            
7C  064     u   0.00    F13

In the case of the original bug report, you can reproduce it by binding Win+C to something, then press Win, press C, release Win, release C. You'll trigger the bound action when you press C, but also open the start menu when you release Win. If you do the more natural press Win, press C, release C, release Win, it works fine.