在 VisualStudio2010w/Powertools/Resharper 中没有响应 Enter.Backspace 和导航键

我有这个非常恼人的问题,在剃刀视图的回车,退格键和导航键经常没有响应。我必须重启 VS 才能恢复正常。我错过了什么吗?

48103 次浏览

I had the same problem and solved it by saving the razor file (Ctrl + S). Once I did this I could use the Enter, Backspace and Navigation keys again.

I believe that Alt + Enter may also work.

I don't often get into this state and the above solution does not solve the underlying problem. I believe that it may have something to do with ReSharper but have not figured out if this assumption is true or not.

There are a number of pages that discuss this type of problem: Link 1 Link 2 Link 3

Please try deleting the hidden '.suo' config from the solution folder.

I know this thread was created some time ago, but this may be an useful tip for someone.

I don't use ReSharper and this still happened. Pressing Control + Tab twice worked for me.

This was happening to me in VS 2010, despite not using R#. After digging through those links @Ryan Spears put in his post I have come across a permanent solution Source. (Note that @Maffelu's solution did work for me, but it can switch back if I accidentally hit Left Alt + Shift).

This is also weird because Left Alt + Shift doesn't seem to change it back, so you have to go to the source: a key binding buried in the Windows Control Panel:

Control Panel > Region and Language > Keyboards and Languages > Change Keyboards > Advanced Key Settings > Change Key Sequence > Select "Not Assigned" for both Switching Input Language and Switch Keyboard Layout.

enter image description here

If you have too many files open in Visual Studio 2010 then Enter or Backspace key will stop working intermittently. Try closing some files and Enter and Backspace key will start working.

Something that worked for me:

Try Tools > Import and Export Settings... then only select Keyboard.

Search for Bkspce and see if it is being used for anything.

I accidentally had something Global bound to Bkspce, Bkspce which caused a very strange problem.

I've seen the same in Visual Studio 2013 and 2015 CTP.

None of the above solutions worked, but restarting Visual Studio did (after displaying the below warning).

enter image description here

This happened to me when I installed ReSharper to a Visual Studio that has VsVim installed, and I fixed it by doing the following:

  1. Uninstall VsVim
  2. Reset the keyboard mapping to default in Tools -> Options -> Environment -> Keyboard
  3. Set the ReSharper keyboard shortcut mapping in ReSharper options. (I use ReSharper 2.x or IntelliJ IDEA), and make sure Enter, Backspace, etc work.
  4. Install VsVim and configure its keyboard options.

Resharper could be the reason.None of the solutions above worked for me. First check if Resharper is the problem.

Simply navigate to Tools > Options > ReSharper > General > Click suspend Resharper.

After taking steps above, if it works now as expected,then your problem could be caused by cache.

Clear cache following by the navigation below.

Resharper > Options > General > Clear caches or erase them manually

Or problem can be caused by not matching script tags in the cshtml.(Weird but it was the case that causes my problem)

This issue occurred for me (in VS 2019) after installing a visual studio extension. So try removing any recently installed extensions.

The extension I used was File Nesting.

Note: System reboot didn't fix the problem.