2

Is it possible to have multiple commands on same Keyboard Shortcut in Visual studio?

like clicking F7 caused two different commands at the same time, instead of only 1 command.

1 Answer 1

3

You can create a Visual Commander command that calls multiple VS commands and assign a shortcut to it, like this:

public void Run(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package) 
{
    DTE.ExecuteCommand("Edit.Copy");
    DTE.ExecuteCommand("Edit.Paste");
}
2
  • How can I add this command shortcut: Ctrl + k, Ctrl + k, Ctrl + m, Ctrl + l, Ctrl + m, Ctrl + l, Ctrl + k, Ctrl + n, Ctrl + k, Ctrl + k
    – user1297556
    Commented Jul 31, 2019 at 6:18
  • @Mehdi You should look for command names assigned to these shortcuts. See stackoverflow.com/questions/13764306/… Commented Jul 31, 2019 at 6:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.