Backspace and arrow keys not working as expected

22

5

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?

benekastah

Posted 2011-12-20T22:48:33.277

Reputation: 319

Plenty of feedback reports about this at connect.microsoft.com. I stopped reading them after a while, nothing definite and lots of users that abandoned their case. Maybe you'll have more energy. – Hans Passant – 2011-12-21T00:16:49.837

How did you find them? The search terms I was using turned up nothing useful. – None – 2011-12-21T21:32:10.977

I typed "backspace" in the search box. – Hans Passant – 2011-12-21T21:33:10.270

I had this too, it turned out to be a plugin that was out of date (ReSharper) – Eric Herlitz – 2012-01-17T19:42:04.633

Cool, let us know the result! – Eric Herlitz – 2012-01-19T19:07:34.460

Answers

22

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

Posted 2011-12-20T22:48:33.277

Reputation: 686

thank you so much!!! I was always reopening file windows every time this happen before I saw this. – artsylar – 2015-09-02T01:53:25.593

Only MS needs to make a hotkey to bring the focus back to the window you're clicking or typing on... figures. Thanks! – DerpyNerd – 2016-08-02T11:57:32.537

Awesome. This totally did it! Much easier than closing and reopening my windows all the time. Thanks! – benekastah – 2012-03-30T18:33:32.417

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.

Miles Ercolani

Posted 2011-12-20T22:48:33.277

Reputation: 41

2It'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 – 2016-03-25T16:08:55.483

2

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

Posted 2011-12-20T22:48:33.277

Reputation: 121

0

First, if you're having issues such as this "command 'references-view.refresh' not found", as you can see here, the shortcut for REFRESH must have been assigned to one key and this key won't be functioning when we are typing on VS code.

To resolve this, open your vs code, under file, go to preferences, under preferences, go to keyboard shortcuts:

File -----> Preferences ---> Keyboard shortcuts an attempt to type in the key you're having issue with would fail.

At the keyboard shortcut, press SHIFT + the particular key you're having issue with, then type Refresh or whatever word you used the affected letter as a shortcut.

Then edit the shortcut, change it from the affected letter to a combination of keys, maybe CTRL+ALT+(any key) or ALT+SHIFT+any key

Please do not use a single key as a shortcut, doing so would make the key not to function in VS code when coding.

CEO

Posted 2011-12-20T22:48:33.277

Reputation: 1

0

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.

Johan Karlsson

Posted 2011-12-20T22:48:33.277

Reputation: 101