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

ctrl-space not working inside remote desktop connection #8142

Closed
darthstark1138 opened this issue Nov 3, 2020 · 20 comments
Closed

ctrl-space not working inside remote desktop connection #8142

darthstark1138 opened this issue Nov 3, 2020 · 20 comments
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Needs-Attention The core contributors need to come back around and look at this ASAP. 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 Product-Terminal The new Windows Terminal.

Comments

@darthstark1138
Copy link

Environment

Windows build number: Microsoft Windows NT 10.0.19042.0
Windows Terminal version (if applicable): 1.3.2651.0

Any other software?
WIndows Remote Desktop Connection

Steps to reproduce

Example:

> ls<space><cursor><press ctrl-space>

Expected behavior

❯ ls
.ssh
AppData
Documents
> ls<space><cursor>

Actual behavior

> ls<space><space><cursor>

In other programs (ex.: Visual Studio) ctrl-space works normally.

@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 Nov 3, 2020
@zadjii-msft
Copy link
Member

What shell are you running in the Terminal (powershell, pwsh, cmd, bash, etc.)?

Do you have "experimental.input.forceVT": true in your settings by any chance?

@zadjii-msft zadjii-msft added Area-Input Related to input processing (key presses, mouse, etc.) Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. labels Nov 13, 2020
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Nov 17, 2020
@ghost
Copy link

ghost commented Nov 17, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@darthstark1138
Copy link
Author

darthstark1138 commented Nov 17, 2020

Sorry, the notification went to spam.

The problem happens in Windows PowerShell and in Powershell Core 7.1.0 . Both in Windows terminal and Windows terminal preview. And only happens on my VM that I access with RDP.

I don't know about that experimental setting.

@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 No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Nov 17, 2020
@zadjii-msft
Copy link
Member

Okay here's another spitball question - what keyboard layout are you using? Does it have an AltGr key by any chance? If it has two ctrl keys, do both not work in the same way?

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Nov 18, 2020
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Nov 22, 2020
@ghost
Copy link

ghost commented Nov 22, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@darthstark1138
Copy link
Author

The keyboard layout is Brazilian ABNT-2. It has 2 Ctrl keys and neither work. It has an alt-gr key. It works as expected even inside terminal.
Also, ctrl-space works starting powershell as its own console.

@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 No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Nov 23, 2020
@darthstark1138
Copy link
Author

Another problem I just noticed: TAB is executed twice. Also only in Windows Terminal, does not happen on powershell or cmd consoles.

~> cd pic
Expected:
~> cd .\Picture
Actual:
~> cd '.\Pictures\Camera Roll'

~> cd d
Expected:
~> cd .\Desktop
Actual:
~> cd .\Documents\

@zadjii-msft
Copy link
Member

@mvhecht Oh, the tab doubling thing is definitely interesting. Did you happen to try the InputServiceEnabled: 0 fix from #4448 in the past? That's the only known thing to cause tab to double like that, as well as cause other issues across the OS.

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 8, 2020
@darthstark1138
Copy link
Author

darthstark1138 commented Dec 9, 2020 via email

@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 9, 2020
@zadjii-msft
Copy link
Member

@mvhecht well that's even more batty. I guess you're now in the category of #8045. That OP was also using Remote Desktop. I don't really have an answer as to why that sometimes doesn't work, but that's the thread.

@darthstark1138
Copy link
Author

Just an amendment, alt-gr + key combinations are the only ones that work now.
So I can type commands as long as they consist entirely of /?°¹²³£¢¬ and don't require an enter at the end.

@zadjii-msft
Copy link
Member

Somehow that makes even less sense 😅 @lhecker you have any ideas why AltGr would work over Remote Desktop, but normal keys wouldn't? This makes it seem like we're filtering the keys Terminal-side. Without a local repro I'm not sure how to begin debugging this

@lhecker
Copy link
Member

lhecker commented Dec 9, 2020

Which VM are you using @mvhecht? Does the VM run locally? And how did you connect using RDP?

@lhecker
Copy link
Member

lhecker commented Dec 9, 2020

This issue could occur if some part of the Terminal <> TerminalInput has a flaw and returns false when a key event was handled and true if it actually wasn't. But I can't immediately see any such flaws in the code.

@darthstark1138
Copy link
Author

Hi @lhecker ,

The VM runs on VMWare, and I access using plain old Windows Remote Desktop, but I also tried using mRemoteNg and it didn't make a difference. It's not local, it runs in my employer's data center.

Checking the #8045 thread I've decided to check ctfmon and it doesn't seem to be running, and also I can't start it, so that may be the problem. But, again, terminal is the only program where input doesn't work.

@ebadger
Copy link

ebadger commented Dec 9, 2020

Can you confirm that ctfmon.exe is running and that the PID is stable?

@darthstark1138
Copy link
Author

Can you confirm that ctfmon.exe is running and that the PID is stable?

No, actually I can confirm that it's not running, and that I can't start it in any way. Not sure why is that; I'm researching solutions to that now.

@darthstark1138
Copy link
Author

In the end...

A Group Policy from my organization was not only disabling the service, but killing ctfmon.exe a few seconds after I started it.

After I got them to remove that policy and rebooted everything is working.

Thanks all and sorry for the trouble.

@zadjii-msft
Copy link
Member

Don't worry about it! I'm glad you found a solution to the issue - I've never heard of anyone doing that with a Group Policy before. That's certainly something that won't work the way they hope, and I'm sorry you got caught on the bad end of that. We'll keep an eye out for other users with similar situations in the future.

@lhecker
Copy link
Member

lhecker commented Dec 11, 2020

@mvhecht That's really interesting! I wouldn't have thought of using policies for that. 😯
If your organization still uses this group policy anywhere else I'd strongly suggest not disabling that service though. It used to be part of Office a long time ago, but nowadays it's an integral part of Windows. For instance without ctfmon any input in UWP applications - including those that are part of Windows itself, like the search bar - will not work properly. It should only use about 5MB memory and no CPU under normal conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Needs-Attention The core contributors need to come back around and look at this ASAP. 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 Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

4 participants