terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Windows key doesn't work when assigning key actions

Open matthewclso opened this issue 1 year ago • 5 comments

Windows Terminal version

1.20.11381.0

Windows build number

10.0.22621.3737

Other Software

No response

Steps to reproduce

Go to settings --> actions --> any action and try to set the key combination. Any combination that involves the windows key is not recognized. This is new with a recent version of terminal.

Expected Behavior

Windows key should be allowed in actions key combinations.

Actual Behavior

The key command does not change. It only changes if the windows key is not involved in the input.

matthewclso avatar Jun 17 '24 04:06 matthewclso

My understanding was that this was by design, since the Windows key is meant to be reserved for OS usage. See https://github.com/microsoft/terminal/issues/4329#issuecomment-577926439. But perhaps that policy has changed.

j4james avatar Jun 23 '24 09:06 j4james

That makes sense, however I don't know why the feature was removed in a recent release. It had been working for quite a long time, so I don't believe it's a technical limitation.

matthewclso avatar Jun 23 '24 09:06 matthewclso

@matthewclso Sorry, I was mistaken. The policy obviously was changed at some point, and support for the Win key was added in PR #9783. I just checked the version I have installed (1.21.1272.0), and it definitely works for me. Is it possible that you're just trying to use a key combination that is already in use by the OS, or some other apps that's hijacking hotkeys? For example, try an obscure combination like Win+Ctrl+Shift+X.

j4james avatar Jun 23 '24 09:06 j4james

Ah, Win+Ctrl+Shift+x does work! But my old combination Win+Ctrl+t doesn't work. Oddly enough, Win+Ctrl+b does work. A few other combinations involving the windows key, even if not paired to a system command, don't work either - might the restrictions for certain key combinations have changed recently?

matthewclso avatar Jun 23 '24 09:06 matthewclso

might the restrictions for certain key combinations have changed recently?

Yeah, I was thinking the same thing. Possibly an OS upgrade or another app that you have installed, e.g. Microsoft PowerToys? I've just tried your key combination (Win+Ctrl+t) and it works for me, but I'm on Windows 10. I've also tried installing the same version of Windows Terminal as you (1.20.11381.0) and it works there too, so I don't think it's related to the terminal version.

j4james avatar Jun 23 '24 10:06 j4james