28

Most of the time Visual Studio seems to work fine. But occasionally, it gets into a funky editing state. I can still type, but I can't move the cursor with the arrow keys. The arrow keys instead seem to take the focus off the editing window. The backspace doesn't work, but the delete key does. The only solution I have found so far is to close all open documents and reopen them.

Is this a bug, or one of those invisible "features" that just seems a lot like a bug? If not a bug, is there a way to toggle out of this state? Otherwise, is there a fix or patch for this?

Jeremy
  • 3
  • 1
benekastah
  • 379
  • 2
  • 4
  • 8

5 Answers5

34

This seems to happen to me when I open a solution and there are files already open. I used to close the files, then close and re-open the solution to fix it, but now I just hit Alt + Enter.

Here is the blog where I found this trick.

Brian Koser
  • 956
  • 10
  • 7
  • Awesome. This totally did it! Much easier than closing and reopening my windows all the time. Thanks! – benekastah Mar 30 '12 at 18:33
  • thank you so much!!! I was always reopening file windows every time this happen before I saw this. – artsylar Sep 02 '15 at 01:53
  • Only MS needs to make a hotkey to bring the focus back to the window you're clicking or typing on... figures. Thanks! – DerpyNerd Aug 02 '16 at 11:57
4

i'm still seeing this issue even after the ALT + ENTER.

However i did notice if i had more than one window open if i clicked into each file then attempted backspace, eventually it worked on one, and then I seemed back in a working state.

  • 2
    It's hard to believe I'm still having this issue in 2016 (VS 2015), but here I am. Switching documents, closing the problem doc, then opening it again took care of it. Thanks! – RobertB Mar 25 '16 at 16:08
3

I also found this is to be the case when a modal dialog is present, even if it is not visible. You might check if VS has some alert dialogs in the background. Closing them returns to normal state.

Stan
  • 131
  • 1
1

Try to reset your keyboard's settings. You can do it like this:

  1. Go to Tools => Options => Environment.
  2. Click on the Keyboard option.
  3. Click on the Reset button from right panel.

Here is an image:

enter image description here

Joseph
  • 2,158
  • 3
  • 14
  • 24
  • Its only your solution that worked for me today.. Thank you for your time posting this answer.. – Thameem Mar 09 '21 at 07:28
1

Any of the above solutions didn't work for me. However after much trial and error I found out that if you restart VS and load or create another project, followed by opening the trouble project again, it works.