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

Visual Error - shortcut CTRL+SHIFT+[dash,equals] #7325

Closed
kellytrinh opened this issue Aug 18, 2020 · 9 comments · Fixed by #7344
Closed

Visual Error - shortcut CTRL+SHIFT+[dash,equals] #7325

kellytrinh opened this issue Aug 18, 2020 · 9 comments · Fixed by #7344
Labels
Area-Settings Issues related to settings and customizability, for console or terminal good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@kellytrinh
Copy link

Environment

WT Version 1.1.2233

Steps to reproduce

  1. Have lots of different profiles defined.
  2. In settings.json extend additional shortcuts from the existing 1 to 9 for 0, - (dash), and = (equals) so that CTRL+SHIFT+[key] opens respective profile

Expected behavior

In the menu for opening a tab/profile, the shortcut for extended shortcuts should appear as logically expected

Actual behavior

In the menu for opening a tab/profile, the shortcut newly defined 0 is appear next to relevant profile but the shortcut for dash and equals do not appear.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 18, 2020
@zadjii-msft
Copy link
Member

Could you share the actual json you've added for these keybindings?

@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 18, 2020
@kellytrinh
Copy link
Author

The relevant lines below; the shortcut themselves do work and I can open the tab/profiles with them fine.

        { "command": { "action": "newTab", "index": 7 }, "keys": "ctrl+shift+9" },
        { "command": { "action": "newTab", "index": 8 }, "keys": "ctrl+shift+0" },        
        { "command": { "action": "newTab", "index": 9 }, "keys": "ctrl+shift+-" },                
        { "command": { "action": "newTab", "index": 10 }, "keys": "ctrl+shift+=" },                

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 18, 2020
@DHowett
Copy link
Member

DHowett commented Aug 18, 2020

It looks like we only actually do this for the first 9 profiles:

// add the keyboard shortcuts for the first 9 profiles
if (profileIndex < 9)
{
// Look for a keychord that is bound to the equivalent

This is probably because we had 9 hardcoded "switch to tab" commands and it was not possible to add a custom index when we first wrote this code 😄

@zadjii-msft
Copy link
Member

Ho boy would you look at that. Yep, we should fix that

@zadjii-msft zadjii-msft added good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) and removed Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 18, 2020
@zadjii-msft zadjii-msft added this to the Terminal v2.0 milestone Aug 18, 2020
@kellytrinh
Copy link
Author

Just noticed - for some reason there seems to be some bug in the shortcut handling - with the JSON snippet above; CTRL+SHIFT+9 works. So does CTRL+SHIFT+[dash]. But the one in the middle CTRL+SHIFT+0 oddly does nothing.

So there is two bugs, the OP with [dash] [equals] shortcuts not appears and additionally the sequence CTRL+SHIFT+0 not being handled.

@DHowett
Copy link
Member

DHowett commented Aug 19, 2020

If you have multiple keyboard layouts enabled, Ctrl+Shift+0 is reserved by Windows as a keyboard layout switch command.

@kellytrinh
Copy link
Author

If you mean multiple languages - no I don't have anything like that installed.

Not sure what other layouts you could mean but happy to look into if you give me a pointer on where to check the windows setting.

Anyway; if you are sure this is not a bug and expected behaviour due to windows outside; then can ignore.

@ghost ghost added the In-PR This issue has a related PR label Aug 19, 2020
@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 Aug 20, 2020
DHowett pushed a commit that referenced this issue Aug 24, 2020
@ghost
Copy link

ghost commented Aug 26, 2020

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

Handy links:

@ghost
Copy link

ghost commented Aug 26, 2020

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

Handy links:

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 good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) 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.

3 participants