Visual Studio 2010: Editor Stops Responding to Keyboard

Visual Studio 2010: Editor stops responding to keyboard

Microsoft have had variations on this problem reported quite a few times via their support portal. Here is one post and if you scroll down you will see a comment with a bunch of other reports all detailing similar(ish) problems.

Microsoft doesn't seem to be able to reproduce the problem but are "duping all the similar keyboard locking problems to a central bug, so that we can think a way to log the events if necessary". Which seems to be a generic response to a lot of these posts. Some people reported that it was simply becuase another window/pane/tab was in focus but I can see the OP obviously did not have this specific problem. Looks to me like one of those random unresolvable bugs. Hope I never get it! There's also numerous forum posts around the Internet, where users stated that removing certain 3rd party plugins has solved this issue.

I just spotted this particular post which has a possibly useful comment on it for you (which also link to this SO post. As I do not have the bug I cannot test its validity for you. The main point of it seems to be something about the keyboard layout switching.

I'm sorry for putting all this into an answer when technically it is not an answer and just a mass of research, but there was no way this was gonna fit into a comment. And also sorry for pretty much link spamming, but again there was no way I could extract everything that they said into this post. I hope there is something useful in there for you :)


EDIT: You should probably check the top rated answer below as this seems to solve a number of peoples issues, although I never had the Resharper plugin and still occasionally experienced this, but now I'm on VS2013 and have not had this problem re-occur, so maybe they fixed it...

Enter., Backspace and the navigation keys not responding in Visual Studio 2010 w/ Powertools/Resharper

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

Visual Studio XAML editor ignoring key presses in the property tab

There is a workaround posted by Tuan Tran 2 on 10/9/2014 at 7:36 PM on
Microsoft Visual Studio and NET Framework Home Page:

  1. Open Notepad, copy and paste this piece of code: taskkill /f /im XDesProc.exe

  2. Save it with .bat extension.

  3. Run the file by double click it whenever the property windows is not responding.

... or instead, simply kill the process XDesProc.exe in Task Manager.

Visual Studio will then give you the option to start again the designer. For what I read, Microsoft have knowledge of this bug, but there is no status for it yet. Hope they resolve the issue very soon.

* UPDATE *
@ajakblackgoat, great idea! You can add the command to Visual Studio as an External Tool:

2]

and use it directly in the Tools Menu:

3]

MFC-SDI application with Visual Studio 2010: New keyboard shortcut not working

I have a hunch you're experiencing a problem I've also come across - when you create an SDI application using the latest version of MFC, by default the application loads the accelerator table from the registry at runtime therefore overwriting anything that you've specified in the resource table. I posted a solution in a previous thread here which I think is the same as what you're seeing. Hope that helps.

Backspace doesn't work in Visual Studio

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.

Visual Studio 2010 XAML Editor awkward IntelliSense?

That's always annoyed me too. One option is to create a simple macro.

  1. Type your XAML tag and name it. (At this point your cursor is inside the quotation marks of the attribute.)
  2. Press Ctrl-Shift-R to start macro recording.
  3. Press End, and then Enter. (Now your cursor is where you want it to be.)
  4. Press Ctrl-Shift-R again to stop macro recording.

If you follow the steps above, Visual Studio will have generated the following macro code, which you can see if you press Alt-F8 and open RecordingModule.TemporaryMacro:

DTE.ActiveDocument.Selection.EndOfLine()
DTE.ActiveDocument.Selection.NewLine()

You can now run this macro with Ctrl-Shift-P, but it's only a temporary macro at this point. You should save it and assign it to a keyboard shortcut.

  1. Open Macro Explorer (Alt-F8).
  2. Find TemporaryMacro under MyMacros | RecordingModule, and rename it. Maybe even move it out of RecordingModule to a different module too.
  3. Open the Tools menu and go to Options, Environment, Keyboard.
  4. Type the name of your macro under "Show commands containing".
  5. Select your macro and assign it shortcut key(s). (I chose Ctrl-Enter.)

So now, instead of moving your hand to press End and then Enter, you can just press Ctrl-Enter.

I also recorded another macro that moves to the end of the line and types " />" for me, and attached that to Ctrl-/. The code VS generates looks like this:

DTE.ActiveDocument.Selection.EndOfLine()
DTE.ActiveDocument.Selection.Text = " />"
DTE.ActiveDocument.Selection.NewLine()

An alternative to all these macros is to turn off the automatic quotes. Open the Tools menu and go to Options, Text Editor, XAML, Miscellaneous. Uncheck the option for auto-inserting attribute quotes. Then it won't add the ending quote for you, and you won't have to use the arrow keys or the End key (although you will have to type the ending quote now, of course).

Why are my arrow keys getting stuck? CodeRush/VS2010

Just had the same problem. I managed to put editor back in "normal" mode by Ctrl+Tab-ing to different tab and back.

Hope this helps someone.

Tools-Environment-Keyboard assign do not take effect on Edit.Cut (Ctrl+X - ReSharper.ReSharper_BookmarksBookmarksMenu)

Thank you Alexander Kurakin. I mapped the "Ctrl+X" shortcut to the "Edit.Cut" action in the "Text Editor" scope. Now it is working.

I solved it for Edit.Cut like this:

Shortcuts for selected command: Ctrl+X (Text Editor)

Use new shortcut in: Text Editor

Press shortcut keys: Ctrl+X

Than Assign and it is working.

Annoying grey block in visual studio

You have "Insert" enabled on your keyboard. Just hit the "Insert" button and it should turn off.



Related Topics



Leave a reply



Submit