RichEditControl.RemoveShortcutKey(Keys, Keys, RichEditViewType) Method

Removes a command shortcut for the specified RichEditView.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v21.2.dll


public void RemoveShortcutKey(
    Keys key,
    Keys modifier,
    RichEditViewType viewType


Name Type Description
key Keys

A Keys enumeration member specifying a key to assign.

modifier Keys

A Keys enumeration member specifying a modifier key.

viewType RichEditViewType

An enumeration value that indicates the view fro which the shortcut key should be removed.


The RichEditControl’s shortcuts should be removed after the control is initialized (e.g. in Window.Loaded event handler).

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

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

using DevExpress.XtraRichEdit;
using System.Windows.Forms;
public MainWindow()
    richEditControl.Loaded += RichEditControl_DocumentLoaded;

private void RichEditControl_DocumentLoaded(object sender, EventArgs e)
        richEditControl.RemoveShortcutKey(Keys.O, Keys.Control,RichEditViewType.PrintLayout);
See Also