Visual studio 2013 won't accept an uppercase E - c#

I have not (knowingly) created or reassigned any keyboard shortcuts, and thought that I should be at using only 'default' keyboard shortcuts. But when I attempt to type an uppercase 'E', the status bar displays,
"(Shift+E) was pressed. Waiting for the second key of the chord..."
. If I hit Esc as suggested in the question, How do you stop Visual Studio from waiting for the second part of a shortcut-combination?, the status bar displays,
"The key combination (Shift+E, Esc) is not a command."
No other key combinations have produced an alternative outcome. This issue only exists for E and only exists in Visual Studio. Shift+E isn't in any Default Keyboard Shortcut I saw on MSDN.
I installed the Intellicommand Extension as recommended in the Display Possible Chord Continuations in Visual Studio discussion, but no prompts are displayed when I type Shift+E.
Any suggestions for troubleshooting?

Go to Tools > Options > Environment/Keyboard dialog. Then put focus on the Press shortcut keys: textbox, do shift+E and see what comes up. Once you find where it is set just update it to something else.

I've just noticed this problem, removed the PowerShell Tools for Visual Studio extension, which I updated the other day and now Shift-E works again...

Just had this happen to me.
Can confirm its definitely caused by the PowerShell Tools for Visual Studio extension.
Pressing Shift+E in the Keyboard dialogue didn't bring up anything, however having read responses to this post about it possibly being related to the mentioned extension searched for PowerShell in the "Show commands containing:" box. It brings up a few, and the second one down for me "EditorContextMenus.CodeWindow.PowerShell.ExecuteAsAScript" had Shift+E, F5. I removed this shortcut and now Shift+E is working fine.

Visual Studio's behaving like you have something bound to Shift-E, _.
Since you say you haven't set up any keybindings, have you tried following MSDN's instructions on resetting your environment?

I got the same problem, but manage to get rid of it.
Most probable cause for me was extension "PowerShell Tools for Visual Studio".
Additionaly, I've disabled keyboard shortcuts synchronization in Tools>Options>Synchronized Settings and restored default keyboard mapping scheme as well.
Hope that helps!

Related

Resharper foreach tab behavior not working

I'm not sure what happened but the default behavior that I've grown accustomed to has stopped working in regards to foreach followed by TAB.
For example. I type the word foreach. I press TAB. I see this:
The first template region is the box with COLLECTION in it. Normally I start typing the collection name. When I'm done I type TAB then set the VARIABLE name. etc.
What I actually get is buggy.
For example, after I type in the collection name:
I press TAB again.
Expected: it moves over to VARIABLE so that I can provide a name.
Actual: it doesn't move over, and it deletes the closing parenthesis and moves the brace, like this:
Does anyone know how to get the normal behavior restored?
Note: I do NOT want to restore defaults. That will wipe out dozens of other fine-grained format settings that I have configured.
Maybe you have some other extensions that are interfering with Resharper.
See this link for more details:
Speeding up ReSharper (and Visual Studio)
The answer is simple: restart visual studio.
For some reason resharper stops responding to normal commands and fixed itself simply by restarting the IDE.

Visual Studio shortcuts in VS 2010 and VS 2012

In in development experience, strange thing I am finding having a PC in a Bank and 3 times it has got errors and changed, and now I am finding issues in VS editors, that for example, short cuts like CTRL KU for uncommenting, and commenting multiple lines together doesn't work properly and my fast typing hands using such short cuts find it difficult to perform activities.
Also, I couldn't do "Undo" of code changes which is very very scary as I used to do a lot of code changes and save and run and again I used to successfully undo everything even though its saved. But I am finding these all not happening in this PC/organization for VS.
I tried googling out for any settings to enable for these features, but futile, as I see not much settings on these found. Could someone please help me out?
Under visual studio
GO to the Tools> Options
A window will pop up. Under Environment choose keyboard.
Make sure visual C# 2005 is selected.
For Comment/Uncomment in your xml file. Make Sure following settings are present there
You might have noticed that "Use New shortcut in" is "Global". In your case it might be something else.
Do the same for Edit.commentselection

Ctrl+K, Ctrl+C is a command no longer working in Visual Studio 2010

I am using Visual Studio and Resharper 8.
For some reasons, my favorite shortcut Ctrl+K, Ctrl+C or Ctrl+D no longer works.
Indeed, the application shows in the status bar the message: The key combination is(Ctrl K Ctrl C ) is not a command.
Any ideas how to reset them?
Many thanks.
Very strange problem. Yes, it is possible to edit the command in Visual Studio. Select Tools and then Options. Once the window is shown, select the Environment option group and then Keyboard, as shown in the picture below:
There, you can edit the shortcuts:
Edit.CommentSelection for commenting a selection (Default shortcut: Ctrl+K, Ctrl+C)
Edit.FormatDocument to format the document (Default shortcut: Ctrl+K, Ctrl+D)
I have had this issue off and on myself in different versions of VS (now VS 2017). I just figured out that it is a combination of two keys to comment and uncomment code in VS.
To comment code: Press Ctrl+K, then also press C while still holding the Ctrl key.
To uncomment code: Press Ctrl+K, then also press U while still holding the Ctrl key.
You can release the Ctrl key after pressing K, then press Ctrl+C (or Ctrl+U to uncomment), but is just easier to press the keys in succession.
I had never noticed the status bar at the bottom of the window stating it was waiting on the second key press (C or U).
Sorry to resurrect a old thread like this but I have had issues with chording since this whole WFH/Covid-19 thing started. When it first happened the only thing that worked was to reinstall VS 2019. It happened again and this time I reset the keyboard setting back to default and it fixed it with out having to reinstall VS2019. It happened again today. Resetting keyboard settings didn't work and I was not in the mood to re-install so I was living with it for a while. It was after I took a lunch break that I noticed that a light on the top right of my keyboard, which is usually on, was off. It's the light for scroll lock. I hit the scroll lock key, the light came back on my keyboard and suddenly all my short cuts were back.
May not be the answer for everyone but if it's intermittent like mine was, it may be this ridiculous key that I have apparently never hit at work...
Visual Studio 2019 here, not using Resharper - CTRL + K, CTRL + C "stopped working".
In my case, the solution was simple.
While editing your files, make sure that you are in the Solution View, not the Folder View.
I also has this issue and found this post, but then realised that ctrl-K wasn't working if code already has a comment within it, Not this is specifically when trying to make a comment in a razor view where there are html comment <!-- --> within the code that needs commenting. This is odd and the first time I have encounter this since the first version of VS.
The solution here is to delete or uncomment that code first.
Faced this issue with Resharper enabled just a few minutes ago in VS2019.
All I had to do was to reset the mappings. No restart required. (Warning : that will reset all your manually added mappings to its default values)
Tools --> Options
Had the same problem with Format.
Follow the directions in the previous post - if Ctrl+K already appears under Edit.FormatDocument, click on Remove and then define it again as Ctrl+K. A warning will come up saying command Ctrl+K was used to clear bookmarks. This may be the root cause, as Ctrl+K is defined in multiple places by default. Once I redefined it, it worked properly.
Select Tools and then Options.Then select the Environment > Keyboard.
In the Keyboard section click Reset.
'Ctrl+K' following with C for comment and U for uncomment while holding Ctrl works. However to simplify and unify the keyboard shortcut to what you are used to you can just change the mapping scheme to something else like VSCode:
'Tools>Options>Environment>Keyboard'
Be sure that you saved the file with .py extension. Otherwise, the software does not perceive the code as command lines and thus does not transfer the lines to comments

Assigning CTRL + T as a shortcut in Visual Studio 2012

Coming from Eclipse and now working in Visual Studio I was trying to assign my hotkey bindings to the same ones I used to have in Eclipse. I have Resharper installed, too.
I've assigned Ctrl+T to "Type Hierarchy" but it still seems to respond as it did just before : it expects me to press another key, as Ctrl+T is being identified as a combo.
Is there any way to accomplish this?
First off, if you're so used to Ctrl+T, at least set it to invoke "Inspect This" (ReSharper.ReSharper_InspectThis in VS options), which brings up a drop-down letting you choose between Type Hierarchy, Call and Value Tracking.
As to shortcut assignment, I'm guessing that you have IntelliJ keymap set up in ReSharper. If that's the case, in order to have Ctrl+T reassigned, you'll have to ruin the entire range of ReSharper's unit testing shortcuts:
If you switch to VS keymap (ReSharper > Options > Environment > Keyboard & Menus > Visual Studio > Apply scheme), it gets substantially better as in all contexts (except for XAML UI Designer for some reason) VS won't expect Ctrl+T to be a part of a combo:
You'll still have to transfer a fundamental ReSharper shortcut which is Go To Type to another shortcut but this is less pain than killing the entire unit testing subsystem.
Last but not least, if you're going to stay with Visual Studio for long, try force yourself to use any of the two standard ReSharper keymaps. ReSharper documentation and ReSharper users talk shortcuts, which sets you up for a hard time learning and communicating.

Visual Studio 2010 IntelliSense window text input field

Recently, probably by some accidental key-combination stroke during furious development, my IntelliSense window has a small text input field above which is really annoying, because I can no longer just type and hit Enter to use the autocompletion feature.
How do I get rid of it?
The key combination you probably pressed was Ctrl + Alt + Space, which toggles the completion methods of intellisense.
Can be switched back to the other completion mode by going to:
Edit-> Intellisense -> Toggle Completion Mode.
this seems like a bug in VS, please see below
http://connect.microsoft.com/VisualStudio/feedback/details/587691/vs2010-bug-intellisense-shows-empty-text-field-and-stops-working-correctly
and this bug is closed as "Not Reproducable"...
did you try restarting the VS? propbably, that should fix your problem.
If yes, can you try restarting the machine?

Categories

Resources