The requested page is not available for the requested platform. You are viewing the content for Default platform.

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.

Example

// adds the Ctrl+1 shortcut
var shortcutOp = {keyCode: 49, ctrl: true, alt: false, shift: false, meta: false};
richEdit.assignShortcut(shortcutOp, 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.

Optional Parameters

Name Type Default Description
ctrl boolean null

true, to involve the Ctlr key in the shortcut; otherwise, false

alt boolean null

true, to involve the Alt key in the shortcut; otherwise, false

shift boolean null

true, to involve the Shift key in the shortcut; otherwise, false

meta boolean null

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