Ask questionsTab key yields an extra keypress

Windows Terminal version (or Windows build number)


Other Software

Windows Version 10.0.19042 Build 19042

Steps to reproduce

(I'm not sure this is the right place to post this, but I'm at the end of my rope. The problem is likely very uncommon, perhaps even special to my machine, but it is very specific to Windows Terminal, so I'm posting here to see if this looks familiar to anyone. Perhaps I'll get a clue to help diagnose this.)

The problem: Inside Windows Terminal, whenever I press the TAB key, I get two of them.

On MY machine (tm), the "steps to reproduce" are:

  1. Open Windows Terminal
  2. Open a tab with WSL
  3. type 'ls' and press the TAB key

The bash completion behaves as if the TAB were pressed twice.

For a while, I thought this was a problem in my bash configuration. But the problem happens in cmd.exe or PowerShell, if they are running in Windows Terminal. I have 3 different Ubuntu versions in wsl, and they all exhibit the behavior when under Windows Terminal.

If I open cmd.exe or Powershell the old fashoned way, without Windows Terminal, the behavior does not appear.

Running WSL from an old-fashioned cmd.exe window results in bash tab completion working the normal way, ie, the double-keypress problem is not seen.

The following C# test program simply echoes keystrokes. Running it from within Windows Terminal (WSL, cmd.exe, powershell, whatever) yields two lines for each press of the TAB key. No such problems running it in regular cmd.exe.

    class Program
        static void Main(string[] args)
		while (true)
			var x = Console.ReadKey();

I have checked my settings.json, and I see nothing that seems likely to cause this. As an experiment, I deleted my settings.json completely and restarted Windows Terminal, and the problem persists (with a newly created settings.json file). I could post my settings.json if it would be helpful.

I have rebooted my machine, no change. I have installed updates, no change.

I cannot report when this problem appeared. IIRC, the problem was happening when I first tried Windows Terminal, quite some time ago, probably shortly after its initial release. Because it's so annoying, I gave up on Windows Terminal and went back to something else. Now I'm trying again, and I'd like to try harder to get Windows Terminal to work without this "rock in my shoe".

Thanks in advance for any assistance. :-)

Expected Behavior

Just one tab keypress.

Actual Behavior

Two tab keypresses (see above).


Answer questions ericsink

FWIW, I ran another experiment, wherein I removed Windows Terminal from my machine and re-installed it.

No change.

Github User Rank List