Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Waiting for second key of chord

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.

like image 493
PortMan Avatar asked Jan 10 '14 02:01

PortMan


People also ask

How do I reset keyboard shortcuts in Visual Studio?

Go to Tools->Options->Keyboard, choose (Default) and click Reset.

How do I reset VS code?

The easiest way to reset VS Code back to the default settings is to clear your user settings.json file. You can open the settings.json file with the Preferences: Open Settings (JSON) command in the Command Palette (Ctrl+Shift+P).


2 Answers

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).

like image 169
roengraft Avatar answered Nov 04 '22 01:11

roengraft


  1. 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".
  2. In the dropdown box "Shortcut currently used by:" you can browse through and manually remove all commands that currently occupy your desired shortcut combination.

enter image description here

like image 39
silkfire Avatar answered Nov 04 '22 01:11

silkfire