Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SpreadsheetControl.RemoveShortcutKey(Keys, Keys) Method

Removes a command shortcut.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v24.2.dll

NuGet Package: DevExpress.Win.Spreadsheet

#Declaration

public void RemoveShortcutKey(
    Keys key,
    Keys modifier
)

#Parameters

Name Type Description
key Keys

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

modifier Keys

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

#Remarks

The following example demonstrates how to remove the Ctrl+O shortcut, which allows users to load a document:

spreadsheetControl.RemoveShortcutKey(System.Windows.Forms.Keys.O, System.Windows.Forms.Keys.Control);

To assign a command shortcut, use the SpreadsheetControl.AssignShortcutKeyToCommand method.

See Also