KeymapBuilder

Builder scope for defining key bindings via DSL.

Example:

val myKeymap = keymapOf {
"Ctrl-s" { save(it); true }
"Ctrl-z" { undo(it); true }
bind("Ctrl-f", mac = "Meta-f") { openSearch(it); true }
}

Functions

Link copied to clipboard
fun bind(key: String? = null, mac: String? = null, win: String? = null, linux: String? = null, run: (EditorSession) -> Boolean)

Bind a key with platform-specific overrides.

Link copied to clipboard
operator fun String.invoke(run: (EditorSession) -> Boolean)

Bind a key to a command.