KeyBinding KeyBinding KeyBinding Interface

Definition

Represents a custom key assignment in the current context.

public interface class KeyBinding
[System.Runtime.InteropServices.Guid("00020998-0000-0000-C000-000000000046")]
public interface KeyBinding
Public Interface KeyBinding
Attributes

Remarks

The KeyBinding object is a member of the KeyBindings collection. Custom key assignments are made in the Customize Keyboard dialog box.

Use KeyBindings(index), where index is the index number, to return a single KeyBinding object.

You can also use the FindKey[Int32, Object] property and the Key(Int32, Object) method to return a KeyBinding object.

Properties

Application Application Application

Returns a Application object that represents the Microsoft Word application.

Command Command Command

Returns the command assigned to the specified key combination.

CommandParameter CommandParameter CommandParameter

Returns the command parameter assigned to the specified shortcut key.

Context Context Context

Returns an object that represents the storage location of the specified key binding. This property can return a Document, Template, or Application object.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

KeyCategory KeyCategory KeyCategory

Returns the type of item assigned to the specified key binding.

KeyCode KeyCode KeyCode

Returns a unique number for the first key in the specified key binding.

KeyCode2 KeyCode2 KeyCode2

Returns a unique number for the second key in the specified key binding.

KeyString KeyString KeyString

Returns the key combination string for the specified keys (for example, CTRL+SHIFT+A).

Parent Parent Parent

Returns an object that represents the parent object of the specified object.

Protected Protected Protected

True if you cannot change the specified key binding in the Customize Keyboard dialog box (from the Tools menu, click Customize, and then click the Keyboard button).

Methods

Clear() Clear() Clear()

Removes the key binding from the KeyBindings collection and resets a built-in command to its default key assignment.

Disable() Disable() Disable()

Removes the specified key combination if it's currently assigned to a command.

Execute() Execute() Execute()

Runs the command associated with the specified key combination.

Rebind(WdKeyCategory, String, Object) Rebind(WdKeyCategory, String, Object) Rebind(WdKeyCategory, String, Object)

Changes the command assigned to the specified key binding.

Applies to