Share via


KeyBindings element

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The KeyBindings element groups KeyBinding elements and other KeyBindings groupings.

Syntax

<KeyBindings>
  <KeyBinding>... </KeyBinding>
  <KeyBinding>... </KeyBinding>
</KeyBindings>

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
Condition Optional. See Conditional attributes.

Child elements

Element Description
KeyBinding element Specifies keyboard shortcuts for the commands.
KeyBindings Groups KeyBinding elements and other KeyBindings groupings.

Parent elements

Element Description
CommandTable element Defines all the elements that represent commands.

Example

<KeyBindings>
  <KeyBinding guid="guidWidgetPackage" id="cmdidUpdateWidget"
    editor="guidWidgetEditor" key1="VK_F5"/>
  <KeyBinding guid="guidWidgetPackage" id="cmdidRunWidget"
    editor="guidWidgetEditor" key1="VK_F5" mod1="Control"/>
</KeyBindings>

See also