问题
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:
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");
}
来源:https://stackoverflow.com/questions/55101593/multiple-commands-on-keyboard-shortcut-in-visual-studio