variable_if, variable_unless

Change an event if/unless the variable is the specified value.

{
    "type": "variable_if",
    "name": "variable name",
    "value": variable value
}
Name Required Description
type Required "variable_if" or "variable_unless".
name Required Target variable name.
value Required Target variable value.
description Optional A human-readable comment

Available types of value

Type Example value Available since
integer 0,1,2,… Karabiner-Elements 11.0.0
boolean true, false Karabiner-Elements 14.4.20
string “layer1”, “layer2” Karabiner-Elements 14.4.20

Confirm the current variable values

You can see the current variable values by EventViewer > Variables.

eventviewer-variables@2x.png