Wednesday, May 12, 2010

Visual Studio 2010 Tab Key Not Working

Several days ago, my tab key stopped working when editing C++ code in Visual Studio 2010. Everything else worked fine, even Ctrl-Tab. But pressing Tab on the keyboard would not insert a tab into the file.  I tried disabling add-ins. No change. I reset the keyboard in Tools / Options / Environment / Keyboard. Still no change. I tried running devenv /safemode. That didn't work either.

Finally I looked at the other command line switches for devenv.exe, where I saw devenv /ResetSettings.  Finally, that fixed the problem.

11 comments:

  1. Thanks for the tip, Jim! This IS an annoying new feature...

    ReplyDelete
  2. I just had this happen to me, I can believe these types of things still happen.

    Thanks,
    Andrew

    ReplyDelete
  3. Thank you for writing it in your blog Jim. Even I found this problem and I was annoyed too much due to it. I write all variables on a single column. Like:
    char ch;
    int i;
    char * str;

    And I just could not do it with tabs :(

    I just found another easier way to do this, without having to loose all the settings.

    Go to Tools->Options->Text Editor->C/C++->Formatting
    And set Automatic Indentation On Tab to False. Its under Indentation group.

    Your problem is gone, without even restarting VS. You enable it (True) and its back on.

    - Charan

    ReplyDelete
  4. Thank you Jim but i have another problem

    When I was try generating stub,then the error says
    "An unknown error occured while processing. No stubs were generated"

    How I can fix this problem?

    ReplyDelete
    Replies
    1. Anonymous,

      Sorry, but I'm not sure how your question is related to this blog post.

      Delete
  5. If You are using Windows 7 then please reset your personalize Theme.

    ReplyDelete
  6. Thank you for the helpful tip!!! Much appreciated

    ReplyDelete