Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding support for win in key bindings? #3184

Closed
david50407 opened this issue Oct 14, 2019 · 7 comments · Fixed by #9783
Closed

Consider adding support for win in key bindings? #3184

david50407 opened this issue Oct 14, 2019 · 7 comments · Fixed by #9783
Assignees
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@david50407
Copy link

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?

@david50407 david50407 added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Oct 14, 2019
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Oct 14, 2019
@DHowett-MSFT
Copy link
Contributor

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 DHowett-MSFT changed the title Support more keybinding modifier Consider adding support for win in key bindings? Oct 14, 2019
@DHowett-MSFT DHowett-MSFT added Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Oct 14, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 14, 2019
@DHowett-MSFT DHowett-MSFT added this to the Terminal Backlog milestone Oct 14, 2019
@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 14, 2019
@szeiger
Copy link

szeiger commented Dec 24, 2019

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

@evertheylen
Copy link

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?

@flery
Copy link

flery commented Mar 19, 2020

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

@wulfland
Copy link

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.

@zadjii-msft zadjii-msft self-assigned this Feb 9, 2021
@zadjii-msft zadjii-msft removed the Help Wanted We encourage anyone to jump in on these. label Feb 9, 2021
@zadjii-msft
Copy link
Member

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

@ghost ghost added the In-PR This issue has a related PR label Apr 12, 2021
@ghost ghost closed this as completed in #9783 Apr 15, 2021
ghost pushed a commit that referenced this issue Apr 15, 2021
## Summary of the Pull Request

Does what it says on the can. People can now use `win` in a keybinding to
indicate that the chord needs <kbd>win</kbd>.

## References
* Done for #653
* See also #8888

## PR Checklist
* [x] Closes #3184
* [x] I work here
* [ ] Tests added/passed
* [ ] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

For the record, I hate this. But it's great for quake mode, so _meh_. There's
shockingly more win keys claimed then you think - many more than the shortcut
guide even shows.

* `win+b`: Focus the tray?
* `win+t`: Focus the taskbar
* `win+p`: Project...
* `win+c`: The powertoys color picker
* `win+v`: cloud clipboard

So the list of valid combos is vanishingly small. It's all about that <kbd>win+~</kbd>

## Validation Steps Performed

Bound
```json
        { "keys": [ "win+`" ], "command": "commandPalette" },
```

and yea, it works as expected
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Apr 15, 2021
mpela81 pushed a commit to mpela81/terminal that referenced this issue Apr 17, 2021
## Summary of the Pull Request

Does what it says on the can. People can now use `win` in a keybinding to
indicate that the chord needs <kbd>win</kbd>.

## References
* Done for microsoft#653
* See also microsoft#8888

## PR Checklist
* [x] Closes microsoft#3184
* [x] I work here
* [ ] Tests added/passed
* [ ] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

For the record, I hate this. But it's great for quake mode, so _meh_. There's
shockingly more win keys claimed then you think - many more than the shortcut
guide even shows.

* `win+b`: Focus the tray?
* `win+t`: Focus the taskbar
* `win+p`: Project...
* `win+c`: The powertoys color picker
* `win+v`: cloud clipboard

So the list of valid combos is vanishingly small. It's all about that <kbd>win+~</kbd>

## Validation Steps Performed

Bound
```json
        { "keys": [ "win+`" ], "command": "commandPalette" },
```

and yea, it works as expected
@ghost
Copy link

ghost commented May 25, 2021

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

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants