I have this very annoying problem that in Razor Views the Enter, Backspace and the navigation keys frequently do not respond. I have to restart VS to get it back to normal again. Am I missing something?
-
Questions about development tools are off-topic here and should go to [SO]. – Adam Lear Aug 31 '11 at 18:49
-
also see: http://stackoverflow.com/a/24529104/984463 – mcfea Oct 22 '15 at 17:45
-
2still happens in VS2017 :'( and I remember this in VS2010 – BritishDeveloper Jul 19 '17 at 14:52
-
1exactly. it still happens in VS 2017. disappointment. – Barış Akkurt Aug 09 '19 at 09:30
10 Answers
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

- 2,963
- 2
- 31
- 39
-
3Good catch with ReSharper. I've been getting this on and off until this morning where one particular view stopped working, and rebooting didn't fix it. Suspend R#, it works. Resume R#, it breaks again. None of the other workarounds helped. – Dan Mangiarelli Apr 09 '12 at 14:38
-
14Select another file tab and then return to the one you were trying to edit. This works for me. – Tyler Durden Aug 30 '12 at 04:05
-
1Installing ComponentArt seemed to cause the issue for me but ALT+Enter still resolved it. – Amicable Jul 16 '13 at 09:04
-
This happened to me with ReSharper 7.1.3. You can test this fairly easily by going to Tools > Options > ReSharper and clicking 'Suspend ReSharper.' The issue disappeared after an upgrade to ReSharper 8. – kiprainey Aug 07 '13 at 14:27
-
I don't have ReSharper, but I do have Power Tools installed and I get this problem. I usually switch tabs and it works again. – Hanna Sep 19 '13 at 16:27
-
2I do not have ReSharper nor Power Tools installed, and I still get this error. But the fix is OK though... – Fazi Nov 11 '13 at 07:44
-
This just happened to me using VS 2013 Express for Windows Desktop. Was solved by pressing Alt + Enter as suggested above, which switched focus to the Properties window. After clicking back to the code editor, I was able to use the Backspace key again. – Lemonseed Feb 08 '16 at 09:20
-
2Alt-Enter, Saving, etc. DID NOT WORK. Solution: Save and reboot the computer! This is Visual Studio 2015 (same bug!!!) – MC9000 Mar 27 '16 at 23:11
-
3Same bug. No ReSharper or ANY extensions installed, VS 2010. Alt-Enter works. – Earth Engine Mar 30 '17 at 22:48
-
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.

- 291
- 3
- 2
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.

- 1
- 1

- 13,002
- 13
- 87
- 129
-
1I have a strong feeling this is the real solution, but I don't know why this would be an issue. See the comment by DigialJonah at http://connect.microsoft.com/VisualStudio/feedback/details/616775/certain-keyboard-keys-stop-working-when-using-vs2010 – cjbarth Mar 20 '14 at 17:55
-
5THANK YOU so much! This was happening while opening C# files from Unity. Just wanted to add for WINDOWS 10 you can get to this setting via: Control Panel > Clock, Language, and Region > Language > Advanced Settings (left side) > Under 'Switching input methods' click on 'Change language bar hot keys' and then you have the answer's window. :D Thank you. – Kyra Oct 29 '15 at 18:44
I don't use ReSharper and this still happened. Pressing Control + Tab twice worked for me.

- 2,018
- 4
- 24
- 35
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).

- 12,822
- 3
- 43
- 47
-
Yeah, I experienced this strange thing after creating a Xamarin solution. I deleted the suo while restarting just to be sure to get rid of it. Strangest bug thing ever. – Mikael Dúi Bolinder Jun 06 '15 at 17:55
-
Yip, this was my issue too. Happened to be after adding a nuget package (VS 2015 Update 2) – lukejkw May 26 '16 at 11:04
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.

- 6,982
- 6
- 47
- 63
-
This fixed it for me, none of the other answers helped sorry... FYI I've just had this problem on VS 2022 after my PC crashed while I was in the middle of coding. Somehow the backspace, enter buttons were doing nothing in VS 2022 when I booted back up. Never had this problem ever before, so it was quite a shock! ;-) – rocket porg May 23 '22 at 17:42
This happened to me when I installed ReSharper
to a Visual Studio that has VsVim
installed, and I fixed it by doing the following:
- Uninstall
VsVim
- Reset the keyboard mapping to default in
Tools
->Options
->Environment
->Keyboard
- Set the
ReSharper
keyboard shortcut mapping inReSharper
options. (I useReSharper 2.x or IntelliJ IDEA
), and make sureEnter
,Backspace
, etc work. - Install
VsVim
and configure its keyboard options.

- 1,619
- 12
- 20
-
I don't use `VsVim`, but resetting the keyboard mapping to default helped me with a similar problem. – TheHvidsten Jun 24 '19 at 09:14
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.

- 31
- 3
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)

- 806
- 11
- 23
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.

- 11
- 1
-
4In my experience it has nothing to do with the number of files openned, as this has happened with me with only one file open... – Fazi Sep 24 '13 at 08:30