keyboardShortcut command
The keyboardShortcut command will try to trigger a ShortcutEvent with a given name.
Parameters
name: String
The key combination to trigger, for example Mod-z for undo with the Undo/Redo extension. Mod means Cmd on macOS and Ctrl on Windows and Linux.
Use the keyboardShortcut command
editor.commands.keyboardShortcut('Mod-z')