When working in Visual Studio, hitting Ctrl+Tab opens the "IDE Navigator".
This allows you to browse open files quickly, and releasing Ctrl should focus on the selected file.
Under certain conditions, the navigator window gets "stuck" and doesn't close when you release Ctrl - you'll need to manually close it by making a selection or closing the navigator.
This behavior occurs under the following conditions:
1) The registry value HKCU\Software\Microsoft\VisualStudio\[version]\General\NavigatorIsSticky is set to 1
2) Sticky keys are enabled in Windows
3) The SPI_GETSCREENREADER flag is set in Windows, which can be caused either by an actual screen reader, or by certain tools like Inspect.exe or AccEvent.exe from the Windows SDK
For condition 1 or 2, simply deleting the registry key or disabling sticky keys should solve the problem.
I experienced condition 3, most likely from one of the mentioned tools failing to unset the flag properly.
The simplest way to fix this is to run Inspect.exe and then close it, which should clear the flag.
Another way is to clear it yourself. Here's a C# console app example that will check the flag, clear it by passing SPI_SETSCREENREADER to SystemParametersInfo, then recheck:
using System;
using System.Runtime.InteropServices;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
bool flagIsSet = false;
bool tmp = false;
// Check flag
SystemParametersInfo(SPI_GETSCREENREADER, 0, ref flagIsSet, 0);
Console.WriteLine("Flag set: {0}", flagIsSet.ToString());
// Set flag
SystemParametersInfo(SPI_SETSCREENREADER, 0, ref tmp, SPIF_SENDCHANGE);
// Recheck flag
SystemParametersInfo(SPI_GETSCREENREADER, 0, ref flagIsSet, 0);
Console.WriteLine("Flag set: {0}", flagIsSet.ToString());
}
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, ref bool pvParam, uint fWinIni);
public const uint SPIF_SENDCHANGE = 0x0002;
public const uint SPI_GETSCREENREADER = 0x0046;
public const uint SPI_SETSCREENREADER = 0x0047;
}
}