Change screen brightness
Raises or lowers the screen brightness by a step, or by a fraction of the full range.
Change brightness by by
Keyboard Maestro: SystemAction IncreaseBrightness, SystemAction DecreaseBrightness, SystemAction IncreaseBrightnessQuarter, SystemAction DecreaseBrightnessQuarter
Details #
Changes the brightness relative to where it is now. It presses the brightness keys, so it moves in the same steps as the keyboard does: one full step is 1/16 of the range, and a small step is a quarter of that, 1/64.
Pick the change with change (direction is another spelling):
up or increase: one full step up.
down or decrease: one full step down.
upSmall, smallUp: one small step up.
downSmall, smallDown: one small step down.
Or give by, a fraction from -1 to 1 of the whole range. A positive number brightens and a negative one dims. The step presses the key as many times as the fraction needs: 0.5 is 8 full steps, and -0.25 is 4 steps down. A fraction smaller than one full step uses small steps. Values beyond -1 or 1 are held to those limits. When by is given it is used and change is ignored.
It cannot set an exact brightness; it only moves from the current level.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
by | number | A number from -1 to 1. The fraction of the range to move. | ||
change | text | up, down, upSmall or downSmall. Required unless by is given. Anything else fails and lists the valid ones. | ||
direction | text | Another spelling of change. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
Nudge the brightness up by a small step. This really changes the brightness:
- Brighten the screen
- Show “Brightness up a little”
Gotchas #
The keys are sent through System Events, so Switchboard Engine needs Automation permission for it. Without it the step fails and points to System Settings > Privacy & Security > Automation.
In a dry run the step is simulated.