Skip to main content

AssignShortcutCommand.execute(keyCode, callback) Method

Executes the AssignShortcutCommand command with the specified parameters.

Declaration

execute(
    keyCode: number,
    callback: () => void
): boolean

Parameters

Name Type Description
keyCode number

The combination of keys specified for a shortcut. This code is specified using the ASPxClientUtils.GetShortcutCode method.

callback () => void

A callback function to execute when a shortcut is activated.

Returns

Type Description
boolean

true if the command has been successfully executed; false if the command execution has failed.

Remarks

Usage example:

richEdit.commands.assignShortcut.execute(ASPxClientUtils.GetShortcutCode(ASPx.KeyCode.Key_u, false, false, false), function(){richEdit.commands.updateField.execute()})

You cannot assign custom shortcuts to the RichEditCommands.copy, RichEditCommands.paste and RichEditCommands.cut commands.

See Also