Skip to main content

SpreadsheetControl.AssignShortcutKeyToCommand(Keys, Keys, SpreadsheetCommandId) Method

Assigns a shortcut key to a command.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v24.1.dll

NuGet Package: DevExpress.Win.Spreadsheet

Declaration

public void AssignShortcutKeyToCommand(
    Keys key,
    Keys modifier,
    SpreadsheetCommandId commandId
)

Parameters

Name Type Description
key Keys

A System.Windows.Forms.Keys enumeration member specifying a key to assign.

modifier Keys

A System.Windows.Forms.Keys enumeration member specifying a modifier key.

commandId DevExpress.XtraSpreadsheet.Commands.SpreadsheetCommandId

A SpreadsheetCommandId enumeration member specifying a command.

Remarks

To remove a command shortcut, use the SpreadsheetControl.RemoveShortcutKey method.

See Also