Command Palette

Create a command palette

You can only create one command palette in your plugin.

// ...

const cmd = ctx.newCommandPalette({
    placeholder: "Search for something",
    // The command palette will open when the user presses 't'
    // You can choose to not have a keyboard shortcut
    keyboardShortcut: "t",
})

// Open the command palette when the tray icon is clicked
tray.onClick(() => {
    cmd.open()
})

Keyboard shortcut

You can set a keyboard shortcut for your command palette. Read this documentation to learn how to format it: https://craig.is/killing/mice.

Items

Last updated