Consider adding support for win in key bindings? #4452

Closed
opened 2026-01-30 23:48:07 +00:00 by claunia · 7 comments
Owner

Originally created by @davy-tw on GitHub (Oct 14, 2019).

Originally assigned to: @zadjii-msft on GitHub.

Description of the new feature/enhancement

Support more keystroke on keybinding like: meta (win) key.
In most UNIX terminal, Ctrl, Alt and Shift are captured by the program, if we use these modifiers to bind keybinding, we cannot send these keys into the program.

Like most terminal emulators in macOS, they most use command (cmd) key to bind shortcuts to avoid prevent occupying sending these modifiers into terminal, IMO, Terminal should support capturing Win (Meta) as modifier and allowing to bind shortcuts.

Proposed technical implementation details (optional)

It seems that Windows::System::VirtualKeyModifiers supports Win key, so is this feature possible?

Originally created by @davy-tw on GitHub (Oct 14, 2019). Originally assigned to: @zadjii-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Support more keystroke on keybinding like: meta (win) key. In most UNIX terminal, Ctrl, Alt and Shift are captured by the program, if we use these modifiers to bind keybinding, we cannot send these keys into the program. Like most terminal emulators in macOS, they most use command (cmd) key to bind shortcuts to avoid prevent occupying sending these modifiers into terminal, IMO, Terminal should support capturing Win (Meta) as modifier and allowing to bind shortcuts. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> It seems that `Windows::System::VirtualKeyModifiers` supports `Win` key, so is this feature possible?
claunia added the Resolution-Fix-CommittedArea-SettingsIssue-TaskProduct-Terminal labels 2026-01-30 23:48:07 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 14, 2019):

The Windows key is owned by the OS Shell, unfortunately, so we won't have terribly much luck in re-binding it inside Terminal. Our current solution is "bind Ctrl+Shift", because the standard set of control sequences doesn't contain serializations for ctrl+shift+(letter).

@DHowett-MSFT commented on GitHub (Oct 14, 2019): The Windows key is owned by the OS Shell, unfortunately, so we won't have terribly much luck in re-binding it inside Terminal. Our current solution is "bind Ctrl+Shift", because the standard set of control sequences doesn't contain serializations for ctrl+shift+(letter).
Author
Owner

@szeiger commented on GitHub (Dec 24, 2019):

For the record, ConEmu supports this. Switching between tabs with Win+number combinations works just fine.

@szeiger commented on GitHub (Dec 24, 2019): For the record, ConEmu supports this. Switching between tabs with Win+number combinations works just fine.
Author
Owner

@evertheylen commented on GitHub (Jan 25, 2020):

I strongly support a feature like this. Visual Studio Code allows this too, and I use it extensively.

The Windows key is owned by the OS Shell

If the OS catches a keystroke before Terminal can, no harm done right?

@evertheylen commented on GitHub (Jan 25, 2020): I strongly support a feature like this. Visual Studio Code allows this too, and I use it extensively. > The Windows key is owned by the OS Shell If the OS catches a keystroke before Terminal can, no harm done right?
Author
Owner

@flery commented on GitHub (Mar 19, 2020):

Would love to be able to reimplement i3 keybindings (would require win modifier as well).

@flery commented on GitHub (Mar 19, 2020): Would love to be able to reimplement i3 keybindings (would require win modifier as well).
Author
Owner

@wulfland commented on GitHub (Aug 24, 2020):

I think this is a very important topic to allow people to customize there shortcuts the way they are used to from Cmder or ITerm. And the documentation is not clear that windows is not an option so far. I had to search hard for it.

@wulfland commented on GitHub (Aug 24, 2020): I think this is a very important topic to allow people to customize there shortcuts the way they are used to from Cmder or ITerm. And the documentation is not clear that windows is not an option so far. I had to search hard for it.
Author
Owner

@zadjii-msft commented on GitHub (Feb 17, 2021):

Note to self, re the changes to TermControl::_TrySendKeyEvent in #9163 - when this feature lands, we can get rid of creating a CoreWindow and querying the modifiers. We'll already have the win modifier

@zadjii-msft commented on GitHub (Feb 17, 2021): Note to self, re the changes to `TermControl::_TrySendKeyEvent` in #9163 - when this feature lands, we can get rid of creating a CoreWindow and querying the modifiers. We'll already _have_ the <kbd>win</kbd> modifier
Author
Owner

@ghost commented on GitHub (May 25, 2021):

:tada:This issue was addressed in #9783, which has now been successfully released as Windows Terminal Preview v1.9.1445.0.🎉

Handy links:

@ghost commented on GitHub (May 25, 2021): :tada:This issue was addressed in #9783, which has now been successfully released as `Windows Terminal Preview v1.9.1445.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.9.1445.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4452