Waiting for second key of chord - visual-studio

I have assigned the keyboard shortcut Ctrl+E to a command. But when I click Ctrl+E, the status bar says Ctrl+E was pressed. Waiting for the second key of the chord...".
If I hit the Esc key, I get "The key combination (Ctrl+E, Esc) is not a command."
How do I activate the command that has been assigned to Ctrl+E?
I know that this is the same as the question How do you stop Visual Studio from waiting for the second part of a shortcut-combination? . But the answer given there (hit Esc) does not work for me.

The selected answer is wrong in stating you cannot use Ctrl+E by itself (at least for Visual Studio 2013).
For those who come from a Mac or other OS background where Ctrl+E takes you to the end of the current line (the End key shortcut by default in VS), this is a really frustrating limitation when switching environments.
I found that in Visual Studio 2013 at least, you can remove all the shortcuts that use the Ctrl+E chord (none of which I will ever use) and set the Edit.LineEnd command to Ctrl+E. It just takes a few minutes tracking down the chords to remove (most of them are under the workspace designer).

To see which commands are using your keyboard shortcut at the moment, enter it
in the "Press shortcut keys:" edit box. Make sure you don't accidentally click "Assign".
In the dropdown box "Shortcut currently used by:" you can browse
through and manually remove all commands that
currently occupy your desired shortcut combination.

Key chords are a keyboard shortcut feature of Visual Studio. They consist of a sequence of key presses like (Ctrl+K, Ctrl+C) for comment code or (Ctrl+K, Ctrl+U) for uncomment code.
They are activated by the user pressing one Ctrl+key combination, then another Ctrl+key combo. For example Ctrl+K, Ctrl+C on my install of Visual Studio is used for commenting selected text.
In your case, Ctrl+E is a common chord starter and is used by many chords. For example Ctrl+E, Ctrl+W = Toggle Word Wrap and Ctrl+E, Ctrl+X = Workspace Designer.ExpandAll.
Depending on which developer setting you've chosen for the IDE, Visual Studio might have Ctrl+E mapped to other chords. In that situation, you cannot use Ctrl+E by itself for a keyboard shortcut
If this is the case, you can create your own chord, Ctrl+E, Ctrl+D is not in use on my install of Visual Studio 2012.
Edit:
Also if you remove all key chords that start with (Ctrl+E) then it can work as a non-chord shortcut.
And your question is not the same as the other question. In that question, the OP has started the chord process (Ctrl+E) and wants to cancel Visual Studio from waiting for the 2nd chord key.

I came to this question because I had the same problem as the OP, but in the Integrated Terminal of Visual Studio Code (not Visual Studio).
My problem:
I couldn't stop the node server by doing Ctrl+C, because my VS Code was waiting for the "second key of chord"...
I fixed it in the user settings, by unchecking the Allow Chords checkbox.
I answered the more suitable question for me here.

I have had the same issue with my "<" [backquote] key and wasn't able to find the right keybinding in the normal settings. Allow chords wouldn't do anything either.
This is for anyone, who isn't able to reasign the key in the default keybindings:
Find the User settings in your terminal.
Windows %APPDATA%\Code\User\
macOS $HOME/Library/Application Support/Code/User/
Linux $HOME/.config/Code/User/
Open the keybindings.json file
look for all chords that you would like gone.
(Obviously) remove/alter them
I hope I could help some of you!

You can disable it only for the integrated VSCode terminal by adding the following to your setttings.json file:
{
...
// Disable chords for terminal usage
"terminal.integrated.allowChords": false
...
}

Go to Tools -> Options.
A window will open up, In that Environment -> Keyboard -> Keyboard
And Just Press the Reset button on the right.
Screenshot

Do
ctrl+ E
then
ctrl + V
More info here:

Related

VS 2017 (Ctrl+R) was pressed. Waiting for second key of chord

In Visual Studio 2015, Ctrl+R was globally mapped to Edit.NavigateTo. In VS 2017 Community, they've renamed this to Edit.GoToAll, which Ctrl+R is globally mapped to. But when I press Ctrl+R in C# editor, I get "(Ctrl+R) was pressed. Waiting for second key of chord..." and the dialog does not open.
What is hijacking Ctrl+R and how do I prevent it?
Aah, didn't notice that shortcuts in use was a dropdown with multiple values - thank you Hans Passant. Looks like Edit.ViewWhiteSpace defaults to Ctrl+R, Ctrl+W and that was making Ctrl+R not work at all. Odd.
I had a massive problem with chords where I couldn't even use "command Z" anymore. The way I was able to fix my chords issue was by editing the JSON file by following:
settings
preferences
keyboard shortcuts
while in keyboard shortcuts on the top right you will see an icon that looks like a file with an arrow on it. Click this. It will take you into keybindings.json.
Here you can view all chords, add, edit and delete chords. I removed my command z chord and everything was back to normal.

Microsoft Visual Studio Hotkey waiting for another keypress

I'm used to Netbeans and all its shortcuts (e.g. ctrl+e to delete a line), but I'm new to Visual Studio, so I don't like its keypress combinations that much.
When I changed all the hotkeys I need (e.g. alt+shift+up/down to move lines up and down), I also tried to set deleting a line to ctrl+e.
The problem is that when I press ctrl+e now, the IDE waits for me to press another key, because there are hotkeys that go like "ctrl+e followed by ctrl+something".
Do I have to disable all the other hotkeys if I just want to use ctrl+e, or can I tell the IDE something like "when nothing is pressed after ctrl+e for 500ms, then dont wait any longer"?
Thanks in advance.
PS: Microsoft Visual Studio Enterprise 2015
These multi-sequence keystrokes are called chords, and Visual Studio uses them because it has so many commands that there would otherwise be nowhere near enough keyboard shortcuts to invoke them all. And no, you cannot set a timeout value.
You have to disable all of the other keyboard shortcuts that involve Ctrl+E, otherwise the software will have no way of knowing if it should keep waiting for you to press the second part of the chord.
Here's a hint that may make your life easier. When you arrive at the Environment → Keyboard options, don't bother to select anything. Just leave everything at their defaults and click in the "Press shortcut keys" box. Type Ctrl+E. Now, the dialog will give you a list of all the currently-mapped shortcuts that use Ctrl+E.
On my installation, all but one of them are specific to the "Workflow Designer". Only one is used by the "Text Editor"—Edit.ToggleWordWrap, which is mapped to Ctrl+E, Ctrl+W. Since you will only be deleting lines in the text editor, you don't actually need to worry about unmapping all of the shortcuts for the Workflow Designer scope. You can just set up your shortcut as being specific to the text editor. Stepwise:
Remove the keyboard shortcut for Edit.ToggleWordWrap. (You can do this quickly by typing "toggleword" into the "Show command containing" textbox.) Click the "Remove" button.
Now, switch to Edit.LineDelete.
Change the "Use new shortcut in" combobox to "Text Editor".
Click in the "Press shortcut keys" box, and type a good old chordless Ctrl+E.
Click "Assign", and you're done (unless you want to change ToggleWordWrap to something else).

alt+ctrl+f4 not working on visual studio 2005? but it did work previously

In VisualStudio .net (say 2005)
I have this shortcut Alt+Ctrl+F4 which closes all the opened windows. (Already mapped to window.closealldocuments)
and another one Alt+Ctrl+Shift+F4 to close all but this window.
Now both shortcuts used to work on my previous workstation.
Both having winxp 32.And i work on sv 2005 on both.
But on this new machine, Alt+Ctrl+F4 does not seem to propagate to Visual studio, like there's some other application or the explorer mapping this key to something else, and it's not propagating the event to vs process.
I know about the 'tools -> options...keyboard' in VS, but when I press the combination in the 'press shortcut keys:' field..
it would receive these combinations: Alt+Ctrl+F5->F10 but won't receive these: Alt+Ctrl+F1->F4.
It's like you didn't press nothing.
So now... any ideas?
the problem was a process that probably was receiving the key combination and not propagating it to the rest of applications.
in my case it was hkcmd.exe (intel's graphic something ) that captures key combinations to do certain things like display rotation and such.
anyway thanks hans passant for your comment.
These mappings aren't hard coded. Not sure what happened, but it is easy to remap them. Just go to Tools -> Options then:
Click in the top indicated text box, then press the key combination, and select the appropriate command for it. I like to use Ctrl + W to close the document and Ctrl + Shift + W for all.
You can set any hotkeys manually in any version of visual studio, just go to Tools->Options...-> Keyboard and assign any command to keys sequence

Stopping mouse selection in Visual Studio

I don't know what key combination I did, but now each time I click somewhere in the page, Visual Studio selects the text between first and second mouse click.
I tried to escape from this "selection mode", but nothing helps, nor Escape, nor left clicks, nor Ctrl+Up/Down.
I opened another VS window and there is all right - normal selection.
What is it, how to cancel it, what is it for?
I should probably restart Visual Studio. I remember that that happened some times ago in VS 2005. Very annoying VS "feature".
P.S. It disappeared as suddenly as it appeared, but I found similar problem described here. The guy says that "The only way to stop is to press escape or shift and an arrow key."
I have very often the same issue, just after stopping the debugger. No idea how it starts... But I found the key combination to stop it: Press "Alt Gr"+"Ctrl(right)"+"Shift(right)"
I figured out how to turn this issue on and off:
Just press the ins (Insert) key; If you're using a full sized keyboard it will be to the right of backspace and above delete or if you're using a smaller keyboard it'll be the second option of zero key on the number pad to the right of the right arrow key.
Click on tools and then options. Under environment select keyboard. Then there will be a window open up with options. The first drop down says something about mapping. Set that to default.
Brief, if this was previously selected, is an old DOS format and the key bindings will cause similar actions.
I have experienced the same problem (VS 2010). Here is what happens:
I start the debugger on a project whith Unmanaged debugging enabled. When I try use the key combination Ctrl+Shift+L to delete a line I get a dialog saying 'Changes are not allowed when unmanaged debugging is enabled'. The title of the dialog is 'Edit and Continue'. When the dialog is closed the editor gets stuck with this behavior:
Shift+Right-Click behavior: It selects the text between the cursor and the position of the mouse-click
Ctrl+Scroll behavior: If I try to scroll using the mouse wheel it will zoom in or out instead.
It behaves like the Shift and Ctrl keys are being held down.
I have found these key combinations that will get me out of this situation:
Shift + Arrow down
Ctrl + Arrow down
Until I discovered this I had to restart Visual Studio.
Use the (insert) Key in the Key board.
I have this issue when I VPN to a machine running VS. Here is the key combination I have found to get me out of this state. I do a ctrl-f to open the find window. I type some characters in the find textbox and I notice that the letters are all capital (even though I did not set the caps lock). I hit the caps lock key and test using the find text box to make sure my caps lock is not set (lowercase). Once the lowercase is set, the selecting text between mouse clicks behavior goes away. Don't know why, but this works for me.

Is there a shortcut key to switch between split panes in visual studio/management studio?

When I have a file open in visual studio/sql server management studio and have it split in to two panes, I'd like to be able to switch between the panes without having to reach for the mouse. Does anyone know if a shortcut key exists for this?
F6 is your friend.
I think you can assign this by going to Tools -> Options -> Keyboard and searching for SplitPane. You should be able to assign shortcut keys for the following values:
Window.NextSplitPane
Window.PreviousSplitPane
CTRL+F6 will cycle through your files and across panes.
In SSMS: right-click toolbars, customize. Under categories, select Window, then under Commands select "Next Split Pane". Drag to toolbar. Right-click and change name to "Next Split P&ane". You can now use alt-a to change split pane.
On Microsoft SQL Server Management Studio (SSMS) 2012, I figured out that it is the combination of Ctrl+Shift+UpArrow(or DownArrow). :-)
This was not easy for me for some reason. This method finally worked (similar to Steve Dignan's answer above but I don't have enough rep to comment yet).
In VS 2012, Tools, Options, Environment, Keyboard.
"Apply the following additional keyboard scheme" set to "Visual C# 2005".
"Use new shortcut in" set to 'Global'.
Enter "splitpane" in "Show commands containing" to get only the 2 desired commands.
Select the first one and remove any shortcuts already assigned.
Click inside the "Press shortcut keys" box and use "Ctrl + Alt + Up Arrow" for prev and down arrow for next.
If either of those shortcut chords are currently used by something else, you may need to search on that command and remove it from there. Then come back to the split pane commands and Assign.
Don't forget to close VS before you open another instance of it.
For Visual Studio 2010 (maybe others as well) F6 will work to jump between split panes if Tools -> Options -> Keyboard does not use the Visual C# 2005 keyboard layout additionally (which was the case for me for I-don't-know-why reasons - maybe I said yes to an installer/first-start question a long time ago).
Of course you will no longer be able to build your project with F6 afterwards. ;-)
For Visual Studio 2012: Tools -> Options -> Keyboard -> search by Window.Split and add a new shortcut.

Resources