Skip to content

master-key.record

Turns a recording marker on or off. Note that all commands are always recorded, regardless of this value. This flag is to make it easy to select past history, by looking for master-key.record entries in the command history.

Furthermore, when record is on, Master Key will change the status bar mode to signal that keys are being recorded.

Arguments

  • on: boolean indicating if the recording flag should be set on (true) or off (false).

Example

Larkin uses the record flag to store command sequences for future replay.

toml
[[bind]]
defaults = "edit.action.history"
name = "record"
description = "Start/stop recording Master Key commands"
key = "shift+q"
when = "!master-key.record"
command = "master-key.record"
args.on = true

[[bind]]
defaults = "edit.action.history"
name = "record"
description = """
Start/stop recording key presses defined by Master Key pushing it to the
top of the `history` stack once recording finishes."
"""
key = "shift+q"
when = "master-key.record"
command = "runCommands"

[[bind.args.commands]]
command = "master-key.record"
args.on = false

[[bind.args.commands]]
command = "master-key.pushHistoryToStack"
args.whereComputedRangeIs.from = 'commandHistory[index-1].name === "record"'
args.whereComputedRangeIs.to = "index"