Commands

The commands of a control manager: actions with names and keyboard shortcuts, which the command palette finds by their names, see ControlManager.commandPalette. Menus of a menu bar add their items as commands.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

the commands, in the order they were added

Functions

Link copied to clipboard
fun add(name: String, shortcut: String? = null, group: String? = null, action: () -> Unit): Command

Adds the command name that calls action, when the keys of shortcut are pressed too, like mod+s; a command with the same name and group replaces it

Link copied to clipboard
fun handle(event: KeyEvent): Boolean

runs the command of the shortcut of event, true when there is one

Link copied to clipboard
fun remove(command: Command)
Link copied to clipboard
fun search(query: String): List<Command>

The commands that match query, best first: those whose titles have the characters of the query in order, the more of them at the starts of words and next to each other, the better