microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.73k stars 8.33k forks source link

No keyboard input #4448

Closed privacyguy123 closed 3 years ago

privacyguy123 commented 4 years ago

You may experience an issue with Windows Terminal where keyboard input does not work. By and large, we've determined that this is caused by the "Touch Keyboard and Handwriting Service" being disabled.

If you're hitting this issue, make sure that the "Touch Keyboard and Handwriting Service" is not disabled. Certain "de-bloating" software (and apparently MSI Afterburner) likes to disable it or suppress it in the name of making your machine less understandable and "faster".

If you're experiencing an input issue that is not helped by exiting MSI Afterburner or re-enabling the "Touch Keyboard and Handwriting Service", please file a new issue.

Original issue content Latest version of Windows Terminal. Tried clean installing multiple times, keyboard input works on everything else (as I am typing with it here ...) yes that includes powershell.exe and cmd.exe. What gives?
zadjii-msft commented 4 years ago

That's certainly unexpected - does this repro with any number of tabs?

Could you share the actual version number from the Terminal about dialog? That info makes it a lot easier for us to track bug reports, since "latest version" could either be "the latest release" or "built from master", and both of those versions change over time compared to when the bug was filed.

There's another bug floating around where focusing the window by clicking on the tab doesn't actually focus the terminal control - does clicking on the "terminal" are of the window do anything?

I'm pretty sure no one on the dev team is seeing anything like this, so it'll be pretty hard for us to fix this bug without more information somehow. Maybe if you could build form source and debug to see if Terminal::SendKeyEvent is getting hit?

privacyguy123 commented 4 years ago

Windows 10 build is Microsoft Windows [Version 10.0.19041.21]. Terminal version is 0.8.10261.0 from the Microsoft Store.

Problem doesn't seem to be focusing, no matter where I click I can't get keyboard input at all.

Perhaps you can talk me through this fix?

privacyguy123 commented 4 years ago

Bug has came back after a clean install - I wish I could remember how to recreate it, I suspect a Windows Update on Insider is messing with it perhaps?

privacyguy123 commented 4 years ago

Bumping this. I see a blinking cursor but still unable to type in Windows Terminal.

MCrank commented 4 years ago

I too am seeing the issue. It has happened to my twice. I can type most special characters i.e.

  • _ = + [ { ] } ; : " " < , > . ? / .

Cannot type any letters or numbers. No special characters on the numbers using shift.

Not sure how it happened but I think in both instances I was using a terminal split screen. When I clicked away from the terminal and came back to it a short bit later the issue was there. I believe the only fix for it at the moment is reboot the machine and I can then type again.

Version: 0.8.10261.0 Windows Insider Build: 19559.rs_prerelease.200131-1437

Also notice what I feel is a large number of Console Windows Host processes running but not sure if this is related. Currently no Terminals or Consoles opened on my desktop image

Created a Dump file of the Terminal Process if that will help in anyway at all let me know how to get it to you.

JoshuaJarman commented 4 years ago

This is happening to me as well, quite frequently.

Terminal works fine for some time then stops accepting keyboard input for Ubuntu Wsl2 container. confirmed MCrank's observation that certain special characters still work fine.

if i open a new tab or close and reopen no change. if i restart terminal app no change.

if i open a powershell tab it works for a short time then exact same issue happens with it so this isn't limited to wsl2 containers oddly enough.

stopping and restarting the LxssManager service seems to restore keyboard input for a period, i didn't think that would affect powershell, so not really sure why, just reporting what i'm seeing in case it is helpful tracking this bug down.

this started happening after the last update, and is is happening frequently enough to make terminal almost unusable and i work all day long at the command line so that is a serious workflow interruption for me.

this last time, restarting lxssManager didn't do the trick and i noticed that start menu, and search also didn't respond to keyboard input even though all other apps still work fine. not sure if this is the same issue? or related?

DHowett-MSFT commented 4 years ago

I know you said "everything else," but when input dies, can you still type into the start menu search box or the feedback hub? Those are both using the modern app platform, where powershell.exe and cmd.exe are not. Looking at a possible input platform issue that's broader than just terminal.

simmessa commented 4 years ago

@DHowett-MSFT I'm on build-19564 and I'm also seeing this, I can confirm it's also happening in the windows start menu and feedback hub, so I confirm that might be broader than windows terminal.

JoshuaJarman commented 4 years ago

when this occurs i cannot type into start menu search or feedback hub or cortana. i completely disabled cortana in case it would help, and it has not.

Windows: 19569.1000 (insiders preview) Windows Terminal Version: 0.9.433.0

feokuma commented 4 years ago

That's certainly unexpected - does this repro with any number of tabs?

Could you share the actual version number from the Terminal about dialog? That info makes it a lot easier for us to track bug reports, since "latest version" could either be "the latest release" or "built from master", and both of those versions change over time compared to when the bug was filed.

There's another bug floating around where focusing the window by clicking on the tab doesn't actually focus the terminal control - does clicking on the "terminal" are of the window do anything?

I'm pretty sure no one on the dev team is seeing anything like this, so it'll be pretty hard for us to fix this bug without more information somehow. Maybe if you could build form source and debug to see if Terminal::SendKeyEvent is getting hit?

I did build and debug and the Terminal::SendKeyEvent doesn't trigged. My problema starts when I enable the Windows Insider and install updates.

bampo commented 4 years ago

Also can't type when starting with PS tab. Then I create cmd tab - now i can type, until change tab focus to other window or tab. Then again keyboard input not works. Remove and reinstall terminal not helps. Windows 19041.113, (Insiders preview)

keithnyc commented 4 years ago

Can confirm this also happens on Windows Insider build 19569. A cmd tab does work within Terminal, but WSL and Powershell do not accept any keyboard inputs except a few special characters (alt+<, alt+>, etc.)

Windows Terminal version: 0.9.433.0

YihaoPeng commented 4 years ago

Maybe it has nothing to do with the current issue. But maybe this is a common problem with modern apps.

I often encounter problems in Windows Search where I cannot type. This phenomenon is more easily encountered with certain Win32 IMEs, such as Baidu Pinyin. This phenomenon is rarely encountered after using Microsoft Pinyin, but it is not completely absent. Reopening the search window after some time, the input may works.

I always thought it was a compatibility issue between modern app and legacy Win32 IME. But occasionally, this can also happen with Microsoft Pinyin. It is a modern app. In addition, the problem persisted during the two-year Insider experience.

I haven't encountered this problem in the Windows terminal, because the old version of Windows terminal did not support IME, and the line ending issue, I have not used it for a long time. If I encounter a problem with Windows terminal and IME, I will provide feedback.


And if you doesn't have an IME, it may be an insider issue:

https://blogs.windows.com/windowsexperience/2020/03/05/announcing-windows-10-insider-preview-build-19577/

  • We fixed an issue where input would stop working in some places if clipboard history (WIN + V) was dismissed without pasting anything.

The "some places" only be modern apps, all win32 applications are unaffected.

keithnyc commented 4 years ago

Windows Insider build 19577 seems to have fixed this issue for me (yay!)

dai commented 4 years ago

I'm pretty sure no one on the dev team is seeing anything like this,

I have been occurring since 0.8 No direct input. Can be entered through the IME (Microsoft IME). Probably most Japanese Windows 10 and wt users have encountered this issue. Is it difficult for a dev team to test in a Japanese environment?

Windows 10.0.19041.113 WT 0.9.433.0 日本語キーボード (106/109 キー)

DHowett-MSFT commented 4 years ago

We see this occasionally, and we're following up with the right team internally. It looks like there's something up in the input stack; we cannot say for sure whether Terminal is the cause of the issue or another victim.

DHowett-MSFT commented 4 years ago

If somebody has a consistent repro that we can do on our own machines, it would be very helpful when we talk to that team.

dai commented 4 years ago

Thanks for the Teams @DHowett-MSFT 😃

I tried to WT (Preview) 0.10.761.0, but it's still happened.

Really hope to solve it somehow. 🙏

p.s.

modified 23rd Mar, 2020

zanardob commented 4 years ago

This has just started happening to me as well. Repair/reset/reinstall did nothing to fix the problem. I can type everywhere else except for the Windows Terminal, where I can only type some special characters as some other people described above.

This is on Windows Terminal Version: 0.10.781.0 Windows 10 Education Build 19041.153

densuke commented 4 years ago

Same trouble happens.

shashankholla commented 4 years ago

Yes, I seem to have the issue as well.

r33int commented 4 years ago

Can also confirm this issue.

DesigningKnights commented 4 years ago

Can confirm this too.

No text input working on any WT tab, but they work in the actual apps.

DesigningKnights commented 4 years ago

Just a quick aside, installing the latest Fast Ring of 19608 seems to have solved it so far. I'm able to type in all windows of the terminal again.

simmessa commented 4 years ago

I'm on 19592 and I haven't seen this happen in a while. Feeling lucky :)

akulbe commented 4 years ago

I am on the latest Slow Ring (19041.207) and I see this as well.

DHowett-MSFT commented 4 years ago

To everyone in this thread who's hitting the issue:

Next time it happens, can you launch the Feedback Hub and use the "Advanced Diagnostics" section to capture diagnostics in the Input and Language category, Input Lag subcategory?

image

image

Click Start Recording, and then enter a few characters into the Terminal.

Move back to the feedback hub and then click Stop Recording.

You'll get a new diagnostic log entry: image

Select File Location, and e-mail me the diagnostic archive inside that folder or attach it to OneDrive and share a link. Please note that it might contain personally-identifiable information (like what characters you entered during the recording phase.) My e-mail address is on my profile.

Thanks! This will go a long way to helping us get to the bottom of this issue.

DHowett-MSFT commented 4 years ago

If any of you manage to get it to start happening while you’re recording, instead of just capturing it when it’s already happened, that would be immensely useful. Please let me know if that’s the case in the email :smile:

sharpjs commented 4 years ago

I had a version of this problem on a fresh install of Windows 19041.207 from ISO. It affected only Windows Terminal; Search and other modern apps worked fine. I was able to resolve it by setting the following registry values and relaunching Terminal.

HKLM\SOFTWARE\Microsoft\Input:
  InputServiceEnabled: 0
  InputServiceEnabledForCCI: 0 # see note in edit 2

EDIT: Windows Search started ignoring the Return key after I changed these settings. A machine restart fixed that. See @r33int's post below for other possible side-effects of this workaround.

EDIT 2: @NicoVogel found that Search works better leaving InputServiceEnabledForCCI at 1.

I was clued to these registry values by watching Terminal in procmon. Terminal was repeatedly opening that key and querying one of those values. The queries possibly were correlated to keystrokes, but I can't say for sure.

@DHowett-MSFT , do you want diags from me as well? My case might be a different problem, since most of the people in this thread report keyboard problems in Search and other apps.

r33int commented 4 years ago

I had a version of this problem on a fresh install of Windows 19041.207 from ISO. It affected only Windows Terminal; Search and other modern apps worked fine. I was able to resolve it by setting the following registry values and relaunching Terminal.

HKLM\SOFTWARE\Microsoft\Input:
  InputServiceEnabled: 0
  InputServiceEnabledForCCI: 0

I was clued to these registry values by watching Terminal in procmon. Terminal was repeatedly opening that key and querying one of those values. The queries possibly were correlated to keystrokes, but I can't say for sure.

@DHowett-MSFT , do you want diags from me as well? My case might be a different problem, since most of the people in this thread report keyboard problems in Search and other apps.

I can confirm this workaround works for me! EDIT: This seems to cause some quirky behavior, such as special characters typing twice, and Search also stops working properly.

I'd like to take diags, but my privacy settings do not allow this, and I am not able to change them for some reason, I'm sorry...

DHowett-MSFT commented 4 years ago

@sharpjs That's really interesting. Traces from your repro might still be helpful, if I can note to the team your finding. :smile:

r33int commented 4 years ago

@DHowett-MSFT Finally I was able to change my privacy settings and take traces. I took two traces, one with @sharpjs workaround, and one without. Hope you can get something useful out of it.

https://plik.root.gg/file/HbRDChcSgYrb7DTD/Kec5YDDfRDjgnFoi/with%20workaround.zip

https://plik.root.gg/file/HbRDChcSgYrb7DTD/HyEEjVclBdGHiu3z/without%20workaround.zip

DHowett-MSFT commented 4 years ago

@r33int thanks! And just to confirm: In the "without workaround" case, you can't type into Terminal at all?

r33int commented 4 years ago

@r33int thanks! And just to confirm: In the "without workaround" case, you can't type into Terminal at all?

Yep

DHowett-MSFT commented 4 years ago

@r33int, or anybody else:

When you're in this state (no input), can you open up the clipboard history prompt (Windows+V) and seeing if your input magically starts working?

r33int commented 4 years ago

@r33int, or anybody else:

When you're in this state (no input), can you open up the clipboard history prompt (Windows+V) and seeing if your input magically starts working?

I have tried entering the clipboard history, and it does not seem to make the input work for me.

sharpjs commented 4 years ago

@DHowett-MSFT:

Traces from your repro might still be helpful,

can you open up the clipboard history prompt (Windows+V) and seeing if your input magically starts working?

Pressing Windows+V opens clipboard history, but does not cause keyboard input to start working.

@r33int:

This seems to cause some quirky behavior, such as special characters typing twice, and Search also stops working properly.

When I set InputServiceEnabled{|ForCCI} = 0, then the Return key specifically became ignored in Search. A machine restart fixed that for me.

I did not notice any problems typing special characters in Terminal or Search, but I use WinCompose, which might be different than your input method.

DHowett-MSFT commented 4 years ago

I'm curious- If you actually submit something through clipboard history, does it then start to work? You'll get a stray ^V or a paste (depending on how Terminal's set up), but a couple of my peers have theorized that this may help.

sharpjs commented 4 years ago

@DHowett-MSFT As for me:

  1. Launch Terminal. ✔️
  2. Win+V → clipboard history widget appears. ✔️
  3. Click on a history item → nothing happens in terminal. ❌
  4. Press a key → nothing happens in terminal. ❌
  5. Right-click in Terminal → history item pastes into terminal. ✔️
  6. Press a key → nothing happens in terminal. ❌

Diagnostics from steps 1-4: clipboard-history.diagnostics.zip

Clipboard history, generated by copying in Notepad:

Clipboard
DHowett-MSFT commented 4 years ago

Thanks! That's comprehensive :smile: and really helpful.

asolopovas commented 4 years ago

+1

DHowett-MSFT commented 4 years ago

@asolopovas Given that we've put together a detailed explanation of how you can help us, I'd appreciate it if you could help us gather more information on this bug instead of just sending "+1" comments.

asolopovas commented 4 years ago

@asolopovas Given that we've put together a detailed explanation of how you can help us, I'd appreciate it if you could help us gather more information on this bug instead of just sending "+1" comments.

i am expiriencing exactly same problem that @sharpjs shouldI be producing same report that he did? @DHowett-MSFT or should I do something else to help?

DHowett-MSFT commented 4 years ago

That would be really helpful :smile: The more data we have on this bug, the better we can find correlations.

asolopovas commented 4 years ago

https://aka.ms/AA8b6o6

EricZimmerman commented 4 years ago

i can confirm the workaround below works for my issue:

https://github.com/microsoft/terminal/issues/4448#issuecomment-617290424

EricZimmerman commented 4 years ago

just changing InputServiceEnabled to a 0 worked for me, if thats any help

InputServiceEnabledForCCI is 1 (default)

if InputServiceEnabledForCCI is 0 and InputServiceEnabled is 1, it does NOT work

toggling InputServiceEnabled without restarting terminal allows terminal to accept input

EricZimmerman commented 4 years ago

Note that v1 fixed this issue for me, even after reversing the settings back to 1 for both

DHowett commented 4 years ago

I mean, we didn’t change anything so I’m going to say the intermittent nature of this bug made it seem fixed. :)

EricZimmerman commented 4 years ago

well, i lied. i deleted my settings, then restarted terminal and it does not work any more. set it back to 0 =(