ShortcutOptions Class
Contains a shortcut’s options.
Declaration
export class ShortcutOptions
Remarks
You can use an object of the ShortcutOptions type in the assignShortcut(shortcut, callback) method.
// adds the Ctrl+1 shortcut
var ctrlKey = true;
var shortcutOpts = new DevExpress.RichEdit.ShortcutOptions(
DevExpress.RichEdit.KeyCode.Key_1, ctrlKey);
richEdit.assignShortcut(shortcutOpts, function () { alert('your actions here'); });
constructor(keyCode)
Initializes a new instance of the ShortcutOptions
class.
Declaration
constructor(
keyCode: KeyCode,
ctrl?: boolean,
alt?: boolean,
shift?: boolean,
meta?: boolean
)
Parameters
Name | Type | Description |
---|---|---|
keyCode | KeyCode | A key’s code. |
ctrl | boolean | true, to involve the Ctlr key in the shortcut; otherwise, false |
alt | boolean | true, to involve the Alt key in the shortcut; otherwise, false |
shift | boolean | true, to involve the Shift key in the shortcut; otherwise, false |
meta | boolean | true, to involve the Meta key in the shortcut; otherwise, false |
Properties
alt Property
Specifies whether the shortcut involves the Alt key.
Declaration
alt: boolean
Property Value
Type | Description |
---|---|
boolean | true, to involve the Alt key in the shortcut; otherwise, false |
ctrl Property
Specifies whether the shortcut involves the Ctrl key.
Declaration
ctrl: boolean
Property Value
Type | Description |
---|---|
boolean | true, to involve the Ctrl key in the shortcut; otherwise, false |
keyCode Property
Specifies a code of a key that the shortcut involves.
Declaration
keyCode: KeyCode
Property Value
Type | Description |
---|---|
KeyCode | A key’s code. |
meta Property
Specifies whether the shortcut involves the Meta key.
Declaration
meta: boolean
Property Value
Type | Description |
---|---|
boolean | true, to involve the Meta key in the shortcut; otherwise, false |
Remarks
The Meta key corresponds to the Windows key on Microsoft keyboards, and to the Command key on Apple keyboards.
shift Property
Specifies whether the shortcut involves the Shift key.
Declaration
shift: boolean
Property Value
Type | Description |
---|---|
boolean | true, to involve the Shift key in the shortcut; otherwise, false |