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

Keyboard Manager null key conflict with WSL #6024

Closed
damnskippy opened this issue Aug 18, 2020 · 8 comments
Closed

Keyboard Manager null key conflict with WSL #6024

damnskippy opened this issue Aug 18, 2020 · 8 comments
Assignees
Labels
Issue-Bug Something isn't working Product-Keyboard Shortcut Manager Issues regarding Keyboard Shortcut Manager Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@damnskippy
Copy link

ℹ Computer information

  • PowerToys version: 0.20.1
  • PowerToy Utility: Keyboard Manager
  • Running PowerToys as Admin: No
  • Windows build number: 1909

📝 Provide detailed reproduction steps (if any)

Map shortcut:
Ctrl(left)+P -> Up -> All Apps

✔️ Expected result

What is the expected result of the above steps?
When Ctrl+P is pressed, Up key must be input

❌ Actual result

What is the actual result of the above steps?
When Ctrl+P is pressed Up key is input correctly.
However issue is that it is followed by a spurious Ctrl+Space also that I did not enter anywhere.

Verified this by doing showkey under wsl - pressing Ctrl+P generated the following output, where the first part is Up key (^[[A) and this is followed by Ctrl+Space (^@)

$ showkey -a

Press any keys - Ctrl-D will terminate this program

^[[A     27 0033 0x1b
         91 0133 0x5b
         65 0101 0x41
^@        0 0000 0x00

📷 Screenshots

Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form
image

@damnskippy damnskippy added the Issue-Bug Something isn't working label Aug 18, 2020
@ghost ghost added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Aug 18, 2020
@saahmedm
Copy link
Contributor

Hi @damnskippy, I can't repro this behaviour, even when I checked my key history with the same mapping. Is this the only mapping you have? Can you share all your active mappings

@saahmedm saahmedm added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 18, 2020
@damnskippy
Copy link
Author

@saahmedm,
Yes, this is the only single mapping I have and need - and unfortunately it is not working correctly for some reason.
I'm truly puzzled why I'm seeing this and you're not able to repro. Is there any log or something I can collect?
Thanks for looking.

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 18, 2020
@damnskippy
Copy link
Author

damnskippy commented Aug 18, 2020

FWIW, I'm primarily using shortcut in windows terminal app if that matters.
However I tested this in cmd.exe and powershell through showkey command and saw in all cases a spurious ^@ entered after the Up key. I don't have any other apps intercepting keys. Strange.

@arjunbalgovind
Copy link
Contributor

@damnskippy as part of our shortcut remap logic we send a null key (key code 0x255). It seems to be that the showkey command in WSL shows that as ^@ i.e. NULL byte. So it isn't actually inserting Ctrl+Space, we are inserting a null key. This is required to prevent certain unexpected behaviors related to releasing modifiers. What is "end-user" effect you are facing from this, apart from it appearing in showkey?
I tried the above remapping in Terminal and it worked as expected for Powershell, cmd and ubuntu (assuming the expected behavior was to show the previous typed command).

@saahmedm saahmedm added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Keyboard Shortcut Manager Issues regarding Keyboard Shortcut Manager and removed Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Needs-Team-Response An issue author responded so the team needs to follow up Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 19, 2020
@damnskippy
Copy link
Author

@arjunbalgovind
The real issue I ran into is that I have Ctrl+Space set as my tmux prefix key.
What happened is that after I set up the shortcut map in Keyboard Manager Ctrl(left)+P -> Up -> All Apps, every time I pressed Ctrl+P, this not only input Up key but also tmux prefix was also invoked, which then I have to explicitly get out of. This really made my only shortcut mapping unusable. So I have unmapped it for the moment. But this is what made me even notice this issue in the first place. Thanks.

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 19, 2020
@damnskippy
Copy link
Author

Since WT now natively supports a way to bind key sequences, I no longer need this. Since no one else is seeing this issue, I will close it.

@saahmedm saahmedm changed the title [Keyboard Manager] Spurious Ctrl+Space input in shortcut mapping Keyboard Manager null key conflict with WSL Sep 17, 2020
@arjunbalgovind arjunbalgovind self-assigned this Oct 6, 2020
@arjunbalgovind arjunbalgovind added the Status-In progress This issue or work-item is under development label Oct 6, 2020
@arjunbalgovind
Copy link
Contributor

@crutkas @saahmedm adding this to the milestone as it gets fixed with #7143 which also fixes #6849

@arjunbalgovind arjunbalgovind added this to the InVEST-2010 milestone Oct 6, 2020
@crutkas crutkas removed the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Oct 7, 2020
@arjunbalgovind arjunbalgovind added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Oct 9, 2020
@crutkas crutkas removed the Needs-Team-Response An issue author responded so the team needs to follow up label Oct 19, 2020
@crutkas
Copy link
Member

crutkas commented Oct 29, 2020

@crutkas crutkas closed this as completed Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Product-Keyboard Shortcut Manager Issues regarding Keyboard Shortcut Manager Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests

4 participants