ctrl-space not working inside remote desktop connection #11260

Closed
opened 2026-01-31 02:42:46 +00:00 by claunia · 20 comments
Owner

Originally created by @darthstark1138 on GitHub (Nov 3, 2020).

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.

Originally created by @darthstark1138 on GitHub (Nov 3, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none 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 <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> ``` ❯ ls .ssh AppData Documents > ls<space><cursor> ``` # Actual behavior <!-- What's actually happening? --> ``` > ls<space><space><cursor> ``` In other programs (ex.: Visual Studio) ctrl-space works normally.
Author
Owner

@zadjii-msft commented on GitHub (Nov 13, 2020):

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 commented on GitHub (Nov 13, 2020): 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?
Author
Owner

@ghost commented on GitHub (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.

@ghost commented on GitHub (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**.
Author
Owner

@darthstark1138 commented on GitHub (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.

@darthstark1138 commented on GitHub (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.
Author
Owner

@zadjii-msft commented on GitHub (Nov 18, 2020):

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 commented on GitHub (Nov 18, 2020): Okay here's another spitball question - what keyboard layout are you using? Does it have an <kbd>AltGr</kbd> key by any chance? If it has two <kbd>ctrl</kbd> keys, do _both_ not work in the same way?
Author
Owner

@ghost commented on GitHub (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.

@ghost commented on GitHub (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**.
Author
Owner

@darthstark1138 commented on GitHub (Nov 23, 2020):

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.

@darthstark1138 commented on GitHub (Nov 23, 2020): 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.
Author
Owner

@darthstark1138 commented on GitHub (Dec 1, 2020):

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\

@darthstark1138 commented on GitHub (Dec 1, 2020): Another problem I just noticed: TAB is executed twice. Also only in Windows Terminal, does not happen on powershell or cmd consoles. ~> cd pic<TAB> Expected: ~> cd .\Picture Actual: ~> cd '.\Pictures\Camera Roll\' ~> cd d<TAB> Expected: ~> cd .\Desktop\ Actual: ~> cd .\Documents\
Author
Owner

@zadjii-msft commented on GitHub (Dec 8, 2020):

@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 commented on GitHub (Dec 8, 2020): @mvhecht Oh, the <kbd>tab</kbd> 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 <kbd>tab</kbd> to double like that, as well as cause other issues across the OS.
Author
Owner

@darthstark1138 commented on GitHub (Dec 9, 2020):

I don't recall changing that, but it indeed was set to 0. So I set it back
to 1 and restarted, then I made sure the Touch Keyboard service was
running. Now neither terminal (stable or preview) recognizes any keyboard
input. So I cried a little.

Now I'm rereading the whole #4448 thread to see if there's anything that
can help.

@darthstark1138 commented on GitHub (Dec 9, 2020): I don't recall changing that, but it indeed was set to 0. So I set it back to 1 and restarted, then I made sure the Touch Keyboard service was running. Now neither terminal (stable or preview) recognizes any keyboard input. So I cried a little. Now I'm rereading the whole #4448 thread to see if there's anything that can help.
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2020):

@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.

@zadjii-msft commented on GitHub (Dec 9, 2020): @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.
Author
Owner

@darthstark1138 commented on GitHub (Dec 9, 2020):

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.

@darthstark1138 commented on GitHub (Dec 9, 2020): 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.
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2020):

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

@zadjii-msft commented on GitHub (Dec 9, 2020): 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
Author
Owner

@lhecker commented on GitHub (Dec 9, 2020):

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

@lhecker commented on GitHub (Dec 9, 2020): Which VM are you using @mvhecht? Does the VM run locally? And how did you connect using RDP?
Author
Owner

@lhecker commented on GitHub (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.

@lhecker commented on GitHub (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.
Author
Owner

@darthstark1138 commented on GitHub (Dec 9, 2020):

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.

@darthstark1138 commented on GitHub (Dec 9, 2020): 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.
Author
Owner

@ebadger commented on GitHub (Dec 9, 2020):

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

@ebadger commented on GitHub (Dec 9, 2020): Can you confirm that ctfmon.exe is running and that the PID is stable?
Author
Owner

@darthstark1138 commented on GitHub (Dec 9, 2020):

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 commented on GitHub (Dec 9, 2020): > 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.
Author
Owner

@darthstark1138 commented on GitHub (Dec 11, 2020):

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.

@darthstark1138 commented on GitHub (Dec 11, 2020): 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.
Author
Owner

@zadjii-msft commented on GitHub (Dec 11, 2020):

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.

@zadjii-msft commented on GitHub (Dec 11, 2020): 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.
Author
Owner

@lhecker commented on GitHub (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.

@lhecker commented on GitHub (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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11260